ÎļþÃû´Ó Weben_CMSרÓôúÂëÉú³ÉÆ÷/Weben_CMS_TemplateDemo/server/src/CMS.Plugin.HIAWms.MySQL/Migrations/20250429025531_InitialCreate.cs ÐÞ¸Ä |
| | |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | public partial class InitialCreate : Migration |
| | | public partial class InitialCreate4 : Migration |
| | | { |
| | | protected override void Up(MigrationBuilder migrationBuilder) |
| | | { |
| | |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmsinoutstockrecords", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | OrderNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "åæ®ç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MaterialName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ç©æåç§°") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MaterialNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ç©æä»¶å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | StockType = table.Column<int>(type: "int", nullable: false, comment: "æä½ç±»å"), |
| | | ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容å¨ç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MaterialModel = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "æºå") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | OperateTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "æä½æ¶é´"), |
| | | Remark = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MaterialId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ç©æID") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | TaskNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ä»»å¡å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | SourcePlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "èµ·å§åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ToPlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "ç®æ åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmsinoutstockrecords", x => x.Id); |
| | | }, |
| | | comment: "åºå
¥åºè®°å½è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmsmaterials", |
| | | columns: table => new |
| | | { |
| | |
| | | MaterialQuality = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "æè´¨ï¼å¦ï¼304ä¸éé¢ï¼") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "é¿åº¦ï¼åä½ï¼mï¼"), |
| | | IsMainBranch = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "æ¯å¦ä¸ºä¸»æ¯ç®¡"), |
| | | IsMainBranch = table.Column<int>(type: "int", nullable: false, defaultValue: 2, comment: "æ¯å¦ä¸ºä¸»æ¯ç®¡"), |
| | | Factory = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "ç产工å") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Certification = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true, comment: "è¯ä¹¦ç¼å·") |
| | |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "åä½å段3 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "æ©å±å±æ§") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "å¹¶åæ³") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "å建æ¶é´"), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "å建人ID", collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "ä¿®æ¹æ¶é´"), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "ä¿®æ¹äººID", collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "æ¯å¦å é¤"), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "å é¤äººID", collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "å 餿¶é´"), |
| | | CreatorName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "å建人") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | LastModifierName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "ä¿®æ¹äºº") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "æåº"), |
| | | Remark = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "æ¯å¦ç¦ç¨") |
| | | }, |
| | | constraints: table => |
| | | { |
| | |
| | | comment: "ä»åºä¿¡æ¯è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmstasks", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | TaskNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ä»»å¡å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | TaskType = table.Column<int>(type: "int", nullable: false, comment: "ä»»å¡ç±»å"), |
| | | TaskLevel = table.Column<int>(type: "int", nullable: false, comment: "ä»»å¡ç级"), |
| | | TaskStatus = table.Column<int>(type: "int", nullable: false, comment: "ä»»å¡ç¶æ"), |
| | | ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "æçç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | SourcePlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "èµ·å§åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ToPlace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "ç®æ åºä½") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Aisle = table.Column<int>(type: "int", nullable: true, comment: "å··é"), |
| | | DodeviceId = table.Column<int>(type: "int", nullable: true, comment: "å åæºID"), |
| | | Dodevicetype = table.Column<int>(type: "int", nullable: false, comment: "设å¤ç±»å"), |
| | | TaskDodeviceStatus = table.Column<int>(type: "int", nullable: false, comment: "设å¤ä»»å¡ç¶æ"), |
| | | IsRead = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "WCSæ¯å¦å¯ä»¥è¯»å"), |
| | | SonTaskType = table.Column<int>(type: "int", nullable: true, comment: "åä»»å¡ç±»å"), |
| | | SourceOrderNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "æ¥æºåæ®å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsNextTask = table.Column<int>(type: "int", nullable: true, comment: "ä¸ä¸ªä»»å¡æ¯å¦çææå"), |
| | | MutableParam1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "å¯ååé1") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MutableParam2 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "å¯ååé2") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MutableParam3 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "å¯ååé3") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmstasks", x => x.Id); |
| | | }, |
| | | comment: "ä»»å¡è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsareas_AreaName", |
| | | table: "scms_wmsareas", |
| | |
| | | name: "IX_scms_wmscontainers_ContainerType", |
| | | table: "scms_wmscontainers", |
| | | column: "ContainerType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_ContainerNo", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "ContainerNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_MaterialId", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "MaterialId"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_MaterialNo", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "MaterialNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_OperateTime", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "OperateTime"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_OrderNo", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "OrderNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_StockType", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "StockType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsinoutstockrecords_TaskNo", |
| | | table: "scms_wmsinoutstockrecords", |
| | | column: "TaskNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsmaterials_MaterialCode", |
| | |
| | | name: "IX_scms_wmsstores_StoreName", |
| | | table: "scms_wmsstores", |
| | | column: "StoreName"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_ContainerNo", |
| | | table: "scms_wmstasks", |
| | | column: "ContainerNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_DodeviceId", |
| | | table: "scms_wmstasks", |
| | | column: "DodeviceId"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_IsRead", |
| | | table: "scms_wmstasks", |
| | | column: "IsRead"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_Sort", |
| | | table: "scms_wmstasks", |
| | | column: "Sort"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_SourceOrderNo", |
| | | table: "scms_wmstasks", |
| | | column: "SourceOrderNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_SourcePlace", |
| | | table: "scms_wmstasks", |
| | | column: "SourcePlace"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_TaskNo", |
| | | table: "scms_wmstasks", |
| | | column: "TaskNo", |
| | | unique: true); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_TaskStatus", |
| | | table: "scms_wmstasks", |
| | | column: "TaskStatus"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_TaskType", |
| | | table: "scms_wmstasks", |
| | | column: "TaskType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmstasks_ToPlace", |
| | | table: "scms_wmstasks", |
| | | column: "ToPlace"); |
| | | } |
| | | |
| | | protected override void Down(MigrationBuilder migrationBuilder) |
| | |
| | | name: "scms_wmscontainers"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsinoutstockrecords"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsmaterials"); |
| | | |
| | | migrationBuilder.DropTable( |
| | |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsstores"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmstasks"); |
| | | } |
| | | } |
| | | } |