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<string>(
|
name: "WareLocationTypeCode",
|
table: "wms_place",
|
type: "nvarchar(max)",
|
nullable: true);
|
|
migrationBuilder.AddColumn<string>(
|
name: "WareContainerTypeCode",
|
table: "wms_material",
|
type: "nvarchar(max)",
|
nullable: true,
|
comment: "车型");
|
|
migrationBuilder.CreateTable(
|
name: "wms_container_type",
|
columns: table => new
|
{
|
Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
|
WareContainerTypeCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型编码"),
|
WareContainerTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型名称"),
|
Length = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "长"),
|
Height = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "高"),
|
Width = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "宽"),
|
LocationType = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "可入库位类型"),
|
Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
|
Status = table.Column<int>(type: "int", nullable: true, comment: "状态"),
|
CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
|
UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
|
CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
|
CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
|
UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
|
UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
|
IsDeleted = table.Column<bool>(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<long>(type: "bigint", nullable: false, comment: "Id主键"),
|
WareLocationTypeCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型编码"),
|
WareLocationTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型名称"),
|
Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "状态"),
|
Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位长度"),
|
Width = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位宽度"),
|
Height = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位高度"),
|
MaxWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "最大承重"),
|
CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
|
UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
|
CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
|
CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
|
UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
|
UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
|
IsDeleted = table.Column<bool>(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<long>(type: "bigint", nullable: false, comment: "Id主键"),
|
PartCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "零件编号"),
|
PartName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "零件名称"),
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位长度"),
|
Width = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位宽度"),
|
Height = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位高度"),
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
|
Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
|
CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
|
UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
|
CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
|
CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
|
UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
|
UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
|
IsDeleted = table.Column<bool>(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");
|
}
|
}
|
}
|