using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CMS.Plugin.HIAWms.MySQL.Migrations { public partial class InitialCreate4 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "scms_wmsareas", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), AreaNo = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "库区编号") .Annotation("MySql:CharSet", "utf8mb4"), AreaName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false, comment: "库区名称") .Annotation("MySql:CharSet", "utf8mb4"), AreaDesc = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "描述") .Annotation("MySql:CharSet", "utf8mb4"), AreaStatus = table.Column(type: "int", nullable: false, comment: "库区状态"), AreaType = table.Column(type: "int", nullable: false, comment: "库区类型"), RedundantField1 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段1 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField2 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段2 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField3 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段3 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), StoreCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "仓库代码") .Annotation("MySql:CharSet", "utf8mb4"), StoreName = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "仓库名称") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), Remark = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_scms_wmsareas", x => x.Id); }, comment: "库区表") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "scms_wmscontainers", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), ContainerNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "托盘编号") .Annotation("MySql:CharSet", "utf8mb4"), ContainerType = table.Column(type: "int", nullable: false, comment: "托盘类型"), ContainerStatus = table.Column(type: "int", nullable: false, comment: "托盘状态"), SpecLength = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "长度"), SpecWidth = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "宽度"), SpecHeight = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "高度"), LimitLength = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "限长"), LimitWidth = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "限宽"), LimitHeight = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "限高"), MaxWeight = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "载重上限"), ExceptionNumber = table.Column(type: "int", nullable: true, comment: "异常数量"), MaterialNumber = table.Column(type: "int", nullable: true, comment: "物料数量"), RedundantField1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "冗余字段1 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField2 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "冗余字段2 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField3 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "冗余字段3 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), Remark = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_scms_wmscontainers", x => x.Id); }, comment: "托盘信息表") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "scms_wmsinoutstockrecords", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), OrderNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "单据编号") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物料件号") .Annotation("MySql:CharSet", "utf8mb4"), StockType = table.Column(type: "int", nullable: false, comment: "操作类型"), ContainerNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编号") .Annotation("MySql:CharSet", "utf8mb4"), MaterialModel = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "机型") .Annotation("MySql:CharSet", "utf8mb4"), OperateTime = table.Column(type: "datetime(6)", nullable: true, comment: "操作时间"), Remark = table.Column(type: "varchar(500)", maxLength: 500, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), MaterialId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物料ID") .Annotation("MySql:CharSet", "utf8mb4"), TaskNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "任务号") .Annotation("MySql:CharSet", "utf8mb4"), SourcePlace = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "起始库位") .Annotation("MySql:CharSet", "utf8mb4"), ToPlace = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "目标库位") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(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 { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), MaterialCode = table.Column(type: "varchar(64)", maxLength: 64, nullable: false, comment: "物料编码(唯一标识)") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(128)", maxLength: 128, nullable: false, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), PurchaseType = table.Column(type: "int", nullable: false, comment: "采购类型(枚举值)"), MaterialType = table.Column(type: "int", nullable: false, comment: "物料类型(枚举值)"), PrimaryUnit = table.Column(type: "varchar(20)", maxLength: 20, nullable: true, comment: "主单位(如:kg、m、个)") .Annotation("MySql:CharSet", "utf8mb4"), Standard = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "规格/标准(如:GB/T 8163-2018)") .Annotation("MySql:CharSet", "utf8mb4"), OuterDiameter = table.Column(type: "decimal(18,2)", nullable: false, comment: "外径(单位:mm)"), WallThickness = table.Column(type: "decimal(18,2)", nullable: false, comment: "壁厚(单位:mm)"), MaterialQuality = table.Column(type: "varchar(64)", maxLength: 64, nullable: true, comment: "材质(如:304不锈钢)") .Annotation("MySql:CharSet", "utf8mb4"), Length = table.Column(type: "decimal(18,2)", nullable: false, comment: "长度(单位:m)"), IsMainBranch = table.Column(type: "int", nullable: false, defaultValue: 2, comment: "是否为主支管"), Factory = table.Column(type: "varchar(64)", maxLength: 64, nullable: true, comment: "生产工厂") .Annotation("MySql:CharSet", "utf8mb4"), Certification = table.Column(type: "varchar(128)", maxLength: 128, nullable: true, comment: "证书编号") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField1 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "冗余字段1 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField2 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "冗余字段2 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField3 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "冗余字段3 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), ExtraProperties = table.Column(type: "longtext", nullable: true, comment: "扩展属性") .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true, comment: "并发戳") .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false, comment: "创建时间"), CreatorId = table.Column(type: "char(36)", maxLength: 36, nullable: true, comment: "创建人ID", collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true, comment: "修改时间"), LastModifierId = table.Column(type: "char(36)", maxLength: 36, nullable: true, comment: "修改人ID", collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否删除"), DeleterId = table.Column(type: "char(36)", maxLength: 36, nullable: true, comment: "删除人ID", collation: "ascii_general_ci"), DeletionTime = table.Column(type: "datetime(6)", nullable: true, comment: "删除时间"), CreatorName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true, comment: "创建人") .Annotation("MySql:CharSet", "utf8mb4"), LastModifierName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true, comment: "修改人") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, defaultValue: 0, comment: "排序"), Remark = table.Column(type: "varchar(500)", maxLength: 500, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "是否禁用"), ExtraField1 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1") .Annotation("MySql:CharSet", "utf8mb4"), ExtraField2 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2") .Annotation("MySql:CharSet", "utf8mb4"), ExtraField3 = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_scms_wmsmaterials", x => x.Id); }, comment: "物料基础信息表") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "scms_wmsplaces", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), PlaceNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "编号") .Annotation("MySql:CharSet", "utf8mb4"), StorageTypeNo = table.Column(type: "int", nullable: false, comment: "货位类型"), PlaceStatus = table.Column(type: "int", nullable: false, comment: "货位状态"), AreaCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "所在库区") .Annotation("MySql:CharSet", "utf8mb4"), Aisle = table.Column(type: "int", nullable: false, comment: "巷道"), RowNo = table.Column(type: "int", nullable: false, comment: "排"), ColumnNo = table.Column(type: "int", nullable: false, comment: "列"), LayerNo = table.Column(type: "int", nullable: false, comment: "层"), Islock = table.Column(type: "int", nullable: false, comment: "是否锁定"), EmptyContainer = table.Column(type: "int", nullable: false, comment: "是否空托"), RedundantField1 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段1 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField2 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段2 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField3 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段3 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), Remark = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_scms_wmsplaces", x => x.Id); }, comment: "库位表") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "scms_wmsstores", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), StoreCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "仓库代码") .Annotation("MySql:CharSet", "utf8mb4"), StoreName = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "仓库名称") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField1 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段1 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField2 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段2 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), RedundantField3 = table.Column(type: "varchar(100)", maxLength: 100, nullable: true, comment: "冗余字段3 - 预留扩展用途") .Annotation("MySql:CharSet", "utf8mb4"), Remark = table.Column(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_scms_wmsstores", x => x.Id); }, comment: "仓库信息表") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "scms_wmstasks", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), TaskNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "任务号") .Annotation("MySql:CharSet", "utf8mb4"), TaskType = table.Column(type: "int", nullable: false, comment: "任务类型"), TaskLevel = table.Column(type: "int", nullable: false, comment: "任务等级"), TaskStatus = table.Column(type: "int", nullable: false, comment: "任务状态"), ContainerNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "托盘编号") .Annotation("MySql:CharSet", "utf8mb4"), SourcePlace = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "起始库位") .Annotation("MySql:CharSet", "utf8mb4"), ToPlace = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "目标库位") .Annotation("MySql:CharSet", "utf8mb4"), Aisle = table.Column(type: "int", nullable: true, comment: "巷道"), DodeviceId = table.Column(type: "int", nullable: true, comment: "堆垛机ID"), Dodevicetype = table.Column(type: "int", nullable: false, comment: "设备类型"), TaskDodeviceStatus = table.Column(type: "int", nullable: false, comment: "设备任务状态"), IsRead = table.Column(type: "tinyint(1)", nullable: false, comment: "WCS是否可以读取"), SonTaskType = table.Column(type: "int", nullable: true, comment: "子任务类型"), SourceOrderNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "来源单据号") .Annotation("MySql:CharSet", "utf8mb4"), IsNextTask = table.Column(type: "int", nullable: true, comment: "下个任务是否生成成功"), MutableParam1 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "可变变量1") .Annotation("MySql:CharSet", "utf8mb4"), MutableParam2 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "可变变量2") .Annotation("MySql:CharSet", "utf8mb4"), MutableParam3 = table.Column(type: "varchar(200)", maxLength: 200, nullable: true, comment: "可变变量3") .Annotation("MySql:CharSet", "utf8mb4"), Sort = table.Column(type: "int", nullable: false, comment: "排序"), IsDisabled = table.Column(type: "tinyint(1)", nullable: true, comment: "是否禁用"), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ConcurrencyStamp = table.Column(type: "varchar(40)", maxLength: 40, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false, defaultValue: false), DeleterId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), DeletionTime = table.Column(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", column: "AreaName"); migrationBuilder.CreateIndex( name: "IX_scms_wmscontainers_ContainerNo", table: "scms_wmscontainers", column: "ContainerNo", unique: true); migrationBuilder.CreateIndex( name: "IX_scms_wmscontainers_ContainerStatus", table: "scms_wmscontainers", column: "ContainerStatus"); migrationBuilder.CreateIndex( 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", table: "scms_wmsmaterials", column: "MaterialCode", unique: true); migrationBuilder.CreateIndex( name: "IX_scms_wmsmaterials_MaterialName", table: "scms_wmsmaterials", column: "MaterialName"); migrationBuilder.CreateIndex( name: "IX_scms_wmsmaterials_MaterialType", table: "scms_wmsmaterials", column: "MaterialType"); migrationBuilder.CreateIndex( name: "IX_scms_wmsmaterials_PurchaseType", table: "scms_wmsmaterials", column: "PurchaseType"); migrationBuilder.CreateIndex( name: "IX_scms_wmsplaces_AreaCode", table: "scms_wmsplaces", column: "AreaCode"); migrationBuilder.CreateIndex( name: "IX_scms_wmsplaces_PlaceNo", table: "scms_wmsplaces", column: "PlaceNo", unique: true); migrationBuilder.CreateIndex( name: "IX_scms_wmsplaces_PlaceStatus", table: "scms_wmsplaces", column: "PlaceStatus"); migrationBuilder.CreateIndex( name: "IX_scms_wmsplaces_StorageTypeNo", table: "scms_wmsplaces", column: "StorageTypeNo"); migrationBuilder.CreateIndex( 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) { migrationBuilder.DropTable( name: "scms_wmsareas"); migrationBuilder.DropTable( name: "scms_wmscontainers"); migrationBuilder.DropTable( name: "scms_wmsinoutstockrecords"); migrationBuilder.DropTable( name: "scms_wmsmaterials"); migrationBuilder.DropTable( name: "scms_wmsplaces"); migrationBuilder.DropTable( name: "scms_wmsstores"); migrationBuilder.DropTable( name: "scms_wmstasks"); } } }