using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
#nullable disable
|
|
namespace CMS.Plugin.PipeLineLems.MySQL.Migrations
|
{
|
public partial class Update1 : Migration
|
{
|
protected override void Up(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.AlterDatabase()
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateTable(
|
name: "scms_callmaterialorderrecords",
|
columns: table => new
|
{
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "原料标识")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
|
Quantity = table.Column<int>(type: "int", nullable: false, comment: "叫料数量"),
|
WmsRetResult = table.Column<string>(type: "longtext", nullable: true, comment: "WMS返回结果")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
WmsTaskNo = table.Column<string>(type: "longtext", nullable: true, comment: "WMS任务号")
|
.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"),
|
Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
|
Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
|
.Annotation("MySql:CharSet", "utf8mb4")
|
},
|
constraints: table =>
|
{
|
table.PrimaryKey("PK_scms_callmaterialorderrecords", x => x.Id);
|
},
|
comment: "叫料记录表")
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateTable(
|
name: "scms_callmaterialorders",
|
columns: table => new
|
{
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "原料标识")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
|
Quantity = table.Column<int>(type: "int", nullable: false, comment: "叫料数量"),
|
WmsRetResult = table.Column<string>(type: "longtext", nullable: true, comment: "WMS返回结果")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
WmsTaskNo = table.Column<string>(type: "longtext", nullable: true, comment: "WMS任务号")
|
.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"),
|
OperationRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "操作备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
DeleteRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "删除备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
|
Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "是否禁用"),
|
ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
|
.Annotation("MySql:CharSet", "utf8mb4")
|
},
|
constraints: table =>
|
{
|
table.PrimaryKey("PK_scms_callmaterialorders", x => x.Id);
|
},
|
comment: "叫料单表")
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateTable(
|
name: "scms_mytestentitynames",
|
columns: table => new
|
{
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
Code = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "名称")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
|
Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
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_mytestentitynames", x => x.Id);
|
},
|
comment: "MyTestEntityName")
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateTable(
|
name: "scms_workplans",
|
columns: table => new
|
{
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
TaskCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "任务编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
WorkPlanStatus = table.Column<int>(type: "int", nullable: false, comment: "计划状态"),
|
CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
|
DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料标识")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "长度(mm)"),
|
MarkingContent = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true, comment: "打码内容")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
MarkingPosition = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "打码位置"),
|
CuttingPosition = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "切割位置"),
|
Quantity = table.Column<int>(type: "int", nullable: false, comment: "管段数量"),
|
FlangeThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "法兰厚度(mm)"),
|
FlangeInnerDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "法兰直径(mm)"),
|
WeldingHeatInput = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "法兰公称压力")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PipeAllowableStress = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "法兰冲码内容")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PipeDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "套管长度(mm)"),
|
PipeWallThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "套管直径(mm)"),
|
FactoryCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工厂代码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ProductCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "产品代码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
WorkstationCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工位代码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
EquipmentCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "设备代码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ProdLineCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "产线编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ShipNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "船号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ProjectNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "项目号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ProcessName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工序名称")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PipeFittingCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管件编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PreSerialNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "顺序号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PipeSpecCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段编码")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PipeSectionName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段名称")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
OuterDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "外径(mm)"),
|
Thickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "壁厚(mm)"),
|
Material = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "材质")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ProcessRouteNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工艺流向编号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
PlannedStartTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "计划开始时间"),
|
PlannedEndTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "计划完成时间"),
|
TeamInfo = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "班组信息")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Timestamp = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "时间戳")
|
.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"),
|
OperationRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "操作备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
DeleteRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "删除备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
|
Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "是否禁用"),
|
ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
|
.Annotation("MySql:CharSet", "utf8mb4")
|
},
|
constraints: table =>
|
{
|
table.PrimaryKey("PK_scms_workplans", x => x.Id);
|
},
|
comment: "作业计划表")
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_callmaterialorderrecords_DataIdentifier",
|
table: "scms_callmaterialorderrecords",
|
column: "DataIdentifier");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_callmaterialorders_DataIdentifier",
|
table: "scms_callmaterialorders",
|
column: "DataIdentifier",
|
unique: true);
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_mytestentitynames_Name",
|
table: "scms_mytestentitynames",
|
column: "Name");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_workplans_DataIdentifier",
|
table: "scms_workplans",
|
column: "DataIdentifier");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_workplans_PlannedEndTime",
|
table: "scms_workplans",
|
column: "PlannedEndTime");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_workplans_PlannedStartTime",
|
table: "scms_workplans",
|
column: "PlannedStartTime");
|
|
migrationBuilder.CreateIndex(
|
name: "IX_scms_workplans_TaskCode",
|
table: "scms_workplans",
|
column: "TaskCode",
|
unique: true);
|
}
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
{
|
migrationBuilder.DropTable(
|
name: "scms_callmaterialorderrecords");
|
|
migrationBuilder.DropTable(
|
name: "scms_callmaterialorders");
|
|
migrationBuilder.DropTable(
|
name: "scms_mytestentitynames");
|
|
migrationBuilder.DropTable(
|
name: "scms_workplans");
|
}
|
}
|
}
|