Sfoglia il codice sorgente

fix(s0): remove stale PriorityCode migration entries that crash startup

After 1b22f9fe changed PriorityCode.RecID to varchar(36) UUID, the
pre-init migration still had IsIdentity=true for that PK — MySQL rejects
AUTO_INCREMENT on varchar, killing the process before 5005 binds.
Also removed three EnsureColumn calls for ScopeCustClass/ScopeOrderType/
ScopeDueDaysMax which 1b22f9fe already removed from the entity.
YY968XX 1 mese fa
parent
commit
149ba52f3c

+ 0 - 8
server/Plugins/Admin.NET.Plugin.AiDOP/Infrastructure/AidopS0ExcelColumnMigration.cs

@@ -366,7 +366,6 @@ public static class AidopS0ExcelColumnMigration
         new("ItemPackMaster", "RecID", true, "主键"),
         new("ItemPackMaster", "RecID", true, "主键"),
         new("LineMaster", "RecID", true, "生产线主键", "Id"),
         new("LineMaster", "RecID", true, "生产线主键", "Id"),
         new("LineSkillMaster", "RecID", true, "产线岗位主键", "Id"),
         new("LineSkillMaster", "RecID", true, "产线岗位主键", "Id"),
-        new("PriorityCode", "RecID", true, "主键"),
         new("ProdLineDetail", "RecID", true, "生产线物料主键"),
         new("ProdLineDetail", "RecID", true, "生产线物料主键"),
         new("ProductStructureMaster", "RecID", true, "主键", "Id"),
         new("ProductStructureMaster", "RecID", true, "主键", "Id"),
         new("ProductStructureOp", "RecID", true, "主键", "Id"),
         new("ProductStructureOp", "RecID", true, "主键", "Id"),
@@ -474,13 +473,6 @@ public static class AidopS0ExcelColumnMigration
         EnsureColumn(db, databaseName, "qms_inspectioninstru", "next_calibration_date",
         EnsureColumn(db, databaseName, "qms_inspectioninstru", "next_calibration_date",
             "varchar(50) NULL COMMENT '下次校准日期'");
             "varchar(50) NULL COMMENT '下次校准日期'");
 
 
-        EnsureColumn(db, databaseName, "PriorityCode", "ScopeCustClass",
-            "varchar(100) NULL COMMENT '业务维度:客户类型/级别(可空=不限)'");
-        EnsureColumn(db, databaseName, "PriorityCode", "ScopeOrderType",
-            "varchar(100) NULL COMMENT '业务维度:订单类型(可空=不限)'");
-        EnsureColumn(db, databaseName, "PriorityCode", "ScopeDueDaysMax",
-            "int NULL COMMENT '业务维度:承诺交期上限天数(可空=不限)'");
-
         var hasOrderReviewTable = db.DbMaintenance.GetTableInfoList(false)
         var hasOrderReviewTable = db.DbMaintenance.GetTableInfoList(false)
             .Any(t => t.Name.Equals("S0OrderReviewCycle", StringComparison.OrdinalIgnoreCase));
             .Any(t => t.Name.Equals("S0OrderReviewCycle", StringComparison.OrdinalIgnoreCase));
         if (hasOrderReviewTable)
         if (hasOrderReviewTable)