From 37454e625df68d40897112b2e8c2e3cf4d7163e3 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期三, 25 三月 2026 11:43:10 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBSeed.cs | 54 +++++++++++++++++++++++++++---------------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBSeed.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBSeed.cs"
index 4a92f35..a4577ea 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBSeed.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/Seed/DBSeed.cs"
@@ -138,33 +138,33 @@
}
#endregion
}
- else
- {
- List<string> columnNames = dbContext.Db.DbMaintenance.GetColumnInfosByTableName(t.Name, false).Select(x => x.DbColumnName).ToList();
- if (t.GetProperties().FirstOrDefault(x => !columnNames.Contains(x.Name)) != null)
- {
- bool isChange = true;
- List<PropertyInfo> propertyInfos = t.GetProperties().Where(x => !columnNames.Contains(x.Name)).ToList();
- for (int i = 0; i < propertyInfos.Count; i++)
- {
- PropertyInfo propertyInfo = propertyInfos[i];
- SugarColumn? sugarColumn = propertyInfo.GetCustomAttribute<SugarColumn>();
- if (sugarColumn != null)
- {
- if (!sugarColumn.IsIgnore)
- {
- if (!sugarColumn.IsNullable)
- {
- isChange = false;
- break;
- }
- }
- }
- }
- if (isChange)
- dbContext.Db.CodeFirst.InitTables(t);
- }
- }
+ //else
+ //{
+ // List<string> columnNames = dbContext.Db.DbMaintenance.GetColumnInfosByTableName(t.Name, false).Select(x => x.DbColumnName).ToList();
+ // if (t.GetProperties().FirstOrDefault(x => !columnNames.Contains(x.Name)) != null)
+ // {
+ // bool isChange = true;
+ // List<PropertyInfo> propertyInfos = t.GetProperties().Where(x => !columnNames.Contains(x.Name)).ToList();
+ // for (int i = 0; i < propertyInfos.Count; i++)
+ // {
+ // PropertyInfo propertyInfo = propertyInfos[i];
+ // SugarColumn? sugarColumn = propertyInfo.GetCustomAttribute<SugarColumn>();
+ // if (sugarColumn != null)
+ // {
+ // if (!sugarColumn.IsIgnore)
+ // {
+ // if (!sugarColumn.IsNullable)
+ // {
+ // isChange = false;
+ // break;
+ // }
+ // }
+ // }
+ // }
+ // if (isChange)
+ // dbContext.Db.CodeFirst.InitTables(t);
+ // }
+ //}
});
ConsoleHelper.WriteSuccessLine($"Tables Created Successfully!");
Console.WriteLine();
--
Gitblit v1.9.3