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_wmstasks",
|
columns: table => new
|
{
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
TaskNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "任务号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
TaskType = table.Column<int>(type: "int", nullable: false, comment: "任务类型"),
|
TaskLevel = table.Column<int>(type: "int", nullable: false, comment: "任务等级"),
|
TaskStatus = table.Column<int>(type: "int", nullable: false, comment: "任务状态"),
|
ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, 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"),
|
Aisle = table.Column<int>(type: "int", nullable: true, comment: "巷道"),
|
DodeviceId = table.Column<int>(type: "int", nullable: true, comment: "堆垛机ID"),
|
Dodevicetype = table.Column<int>(type: "int", nullable: false, comment: "设备类型"),
|
TaskDodeviceStatus = table.Column<int>(type: "int", nullable: false, comment: "设备任务状态"),
|
IsRead = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "WCS是否可以读取"),
|
SonTaskType = table.Column<int>(type: "int", nullable: true, comment: "子任务类型"),
|
SourceOrderNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "来源单据号")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
IsNextTask = table.Column<int>(type: "int", nullable: true, comment: "下个任务是否生成成功"),
|
MutableParam1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "可变变量1")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
MutableParam2 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "可变变量2")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
MutableParam3 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "可变变量3")
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
|
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_wmstasks", x => x.Id);
|
},
|
comment: "任务表")
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
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_wmstasks");
|
}
|
}
|
}
|