using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
#nullable disable
|
|
namespace CMS.Plugin.HIAWms.MySQL.Migrations
|
{
|
public partial class InitialCreate7 : Migration
|
{
|
protected override void Up(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.CreateTable(
|
name: "scms_wmscontainerplaces",
|
columns: table => new
|
{
|
PlaceNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "库位编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "托盘编号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
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_wmscontainerplaces", x => new { x.PlaceNo, x.ContainerNo });
|
},
|
comment: "容器库位关系表")
|
.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"),
|
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.CreateIndex(
|
name: "IX_scms_wmsmaterialstocks_MaterialNo",
|
table: "scms_wmsmaterialstocks",
|
column: "MaterialNo");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_wmscontainerplaces_ContainerNo",
|
table: "scms_wmscontainerplaces",
|
column: "ContainerNo");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_wmscontainerplaces_PlaceNo",
|
table: "scms_wmscontainerplaces",
|
column: "PlaceNo");
|
|
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");
|
}
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.DropTable(
|
name: "scms_wmscontainerplaces");
|
|
migrationBuilder.DropTable(
|
name: "scms_wmsinoutstockrecords");
|
|
migrationBuilder.DropIndex(
|
name: "IX_scms_wmsmaterialstocks_MaterialNo",
|
table: "scms_wmsmaterialstocks");
|
}
|
}
|
}
|