using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace iWare.Wms.Database.Migrations.Migrations { public partial class v103 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "WareLocationTypeCode", table: "wms_place", type: "nvarchar(max)", nullable: true); migrationBuilder.AddColumn( name: "WareContainerTypeCode", table: "wms_material", type: "nvarchar(max)", nullable: true, comment: "车型"); migrationBuilder.CreateTable( name: "wms_container_type", columns: table => new { Id = table.Column(type: "bigint", nullable: false, comment: "Id主键"), WareContainerTypeCode = table.Column(type: "nvarchar(max)", nullable: true, comment: "类型编码"), WareContainerTypeName = table.Column(type: "nvarchar(max)", nullable: true, comment: "类型名称"), Length = table.Column(type: "decimal(18,2)", nullable: true, comment: "长"), Height = table.Column(type: "decimal(18,2)", nullable: true, comment: "高"), Width = table.Column(type: "decimal(18,2)", nullable: true, comment: "宽"), LocationType = table.Column(type: "nvarchar(max)", nullable: true, comment: "可入库位类型"), Remarks = table.Column(type: "nvarchar(max)", nullable: true, comment: "备注"), Status = table.Column(type: "int", nullable: true, comment: "状态"), CreatedTime = table.Column(type: "datetimeoffset", nullable: true, comment: "创建时间"), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true, comment: "更新时间"), CreatedUserId = table.Column(type: "bigint", nullable: true, comment: "创建者Id"), CreatedUserName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"), UpdatedUserId = table.Column(type: "bigint", nullable: true, comment: "修改者Id"), UpdatedUserName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"), IsDeleted = table.Column(type: "bit", nullable: false, comment: "软删除标记") }, constraints: table => { table.PrimaryKey("PK_wms_container_type", x => x.Id); }, comment: "载具类型管理"); migrationBuilder.CreateTable( name: "wms_location_type", columns: table => new { Id = table.Column(type: "bigint", nullable: false, comment: "Id主键"), WareLocationTypeCode = table.Column(type: "nvarchar(max)", nullable: true, comment: "类型编码"), WareLocationTypeName = table.Column(type: "nvarchar(max)", nullable: true, comment: "类型名称"), Status = table.Column(type: "int", nullable: false, comment: "状态"), Remark = table.Column(type: "nvarchar(max)", nullable: true, comment: "状态"), Length = table.Column(type: "decimal(18,2)", nullable: false, comment: "库位长度"), Width = table.Column(type: "decimal(18,2)", nullable: false, comment: "库位宽度"), Height = table.Column(type: "decimal(18,2)", nullable: false, comment: "库位高度"), MaxWeight = table.Column(type: "decimal(18,2)", nullable: false, comment: "最大承重"), CreatedTime = table.Column(type: "datetimeoffset", nullable: true, comment: "创建时间"), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true, comment: "更新时间"), CreatedUserId = table.Column(type: "bigint", nullable: true, comment: "创建者Id"), CreatedUserName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"), UpdatedUserId = table.Column(type: "bigint", nullable: true, comment: "修改者Id"), UpdatedUserName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"), IsDeleted = table.Column(type: "bit", nullable: false, comment: "软删除标记") }, constraints: table => { table.PrimaryKey("PK_wms_location_type", x => x.Id); }, comment: "库位类型"); migrationBuilder.CreateTable( name: "wms_part", columns: table => new { Id = table.Column(type: "bigint", nullable: false, comment: "Id主键"), PartCode = table.Column(type: "nvarchar(max)", nullable: true, comment: "零件编号"), PartName = table.Column(type: "nvarchar(max)", nullable: true, comment: "零件名称"), MaterialCode = table.Column(type: "nvarchar(max)", nullable: true), Length = table.Column(type: "decimal(18,2)", nullable: false, comment: "库位长度"), Width = table.Column(type: "decimal(18,2)", nullable: false, comment: "库位宽度"), Height = table.Column(type: "decimal(18,2)", nullable: false, comment: "库位高度"), Remark = table.Column(type: "nvarchar(max)", nullable: true, comment: "备注"), Status = table.Column(type: "int", nullable: false, comment: "状态"), CreatedTime = table.Column(type: "datetimeoffset", nullable: true, comment: "创建时间"), UpdatedTime = table.Column(type: "datetimeoffset", nullable: true, comment: "更新时间"), CreatedUserId = table.Column(type: "bigint", nullable: true, comment: "创建者Id"), CreatedUserName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"), UpdatedUserId = table.Column(type: "bigint", nullable: true, comment: "修改者Id"), UpdatedUserName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"), IsDeleted = table.Column(type: "bit", nullable: false, comment: "软删除标记") }, constraints: table => { table.PrimaryKey("PK_wms_part", x => x.Id); }, comment: "零件信息"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "wms_container_type"); migrationBuilder.DropTable( name: "wms_location_type"); migrationBuilder.DropTable( name: "wms_part"); migrationBuilder.DropColumn( name: "WareLocationTypeCode", table: "wms_place"); migrationBuilder.DropColumn( name: "WareContainerTypeCode", table: "wms_material"); } } }