You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1091 lines
81 KiB

2 years ago
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win_in.Sfs.Wms.Job.Migrations
{
public partial class _2022519newdb : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "JobCheckJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DeliverNoteNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobCheckJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobCountJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CountPlanNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CountStage = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobCountJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobDeliverJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DeliverRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Customer = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobDeliverJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobInspectJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
InspectNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ReceiptNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ArriveNoticeNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AsnNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RpNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
NextAction = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobInspectJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobIssueJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
MaterialRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Workshop = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobIssueJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobProductReceiveJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProductionPlanNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Workshop = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Shift = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobProductReceiveJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobPurchaseReceiptJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ArriveNoticeNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AsnNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RpNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
SupplierName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Type = table.Column<int>(type: "int", nullable: false),
TimeWindow = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobPurchaseReceiptJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobPurchaseReturnJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ArriveNoticeNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PurchaseReceiptNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AsnNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobPurchaseReturnJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobPutawayJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
InspectNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ReceiptNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ArriveNoticeNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AsnNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RpNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProductReceiptNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Company = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<int>(type: "int", nullable: false),
JobStatus = table.Column<int>(type: "int", nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobPutawayJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "JobCheckJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Order = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CustomerItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Qty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
Qty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
ContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Lot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Batch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
Batch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_JobCheckJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobCheckJobDetail_JobCheckJob_MasterID",
column: x => x.MasterID,
principalTable: "JobCheckJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobCountJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CountLabel = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
InventoryQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
InventoryQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
CountQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
CountQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
ContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Lot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Batch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
Batch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
LocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_JobCountJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobCountJobDetail_JobCountJob_MasterID",
column: x => x.MasterID,
principalTable: "JobCountJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobDeliverJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobDeliverJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobDeliverJobDetail_JobDeliverJob_MasterID",
column: x => x.MasterID,
principalTable: "JobDeliverJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobInspectJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
InspectType = table.Column<int>(type: "int", nullable: false),
SamplePercent = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
ReceiveQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
ReceiveQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
InspectQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
GoodQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
FailedReason = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
FailedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
CrackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
InspectUser_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
InspectUser_Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
InspectUser_Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
NotPassedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobInspectJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobInspectJobDetail_JobInspectJob_MasterID",
column: x => x.MasterID,
principalTable: "JobInspectJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobInspectJobSummaryDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
InspectType = table.Column<int>(type: "int", nullable: false),
SamplePercent = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
ReceiveQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
ReceiveQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
InspectQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
GoodQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
FailedReason = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
FailedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
CrackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
InspectUser_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
InspectUser_Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
InspectUser_Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
NotPassedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false, defaultValue: 0m),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobInspectJobSummaryDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobInspectJobSummaryDetail_JobInspectJob_MasterID",
column: x => x.MasterID,
principalTable: "JobInspectJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobIssueJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RequestLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Operation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
DistributionType = table.Column<int>(type: "int", nullable: false),
TruncType = table.Column<int>(type: "int", nullable: false),
RoundedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
PlannedSplitRule = table.Column<int>(type: "int", nullable: false),
PlanBeginTime = table.Column<DateTime>(type: "datetime2", nullable: false),
DeliveryQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobIssueJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobIssueJobDetail_JobIssueJob_MasterID",
column: x => x.MasterID,
principalTable: "JobIssueJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobProductReceiveJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RawLocation = table.Column<string>(type: "nvarchar(max)", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobProductReceiveJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobProductReceiveJobDetail_JobProductReceiveJob_MasterID",
column: x => x.MasterID,
principalTable: "JobProductReceiveJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobPurchaseReceiptJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
PoLine = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobPurchaseReceiptJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobPurchaseReceiptJobDetail_JobPurchaseReceiptJob_MasterID",
column: x => x.MasterID,
principalTable: "JobPurchaseReceiptJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobPurchaseReturnJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobPurchaseReturnJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobPurchaseReturnJobDetail_JobPurchaseReturnJob_MasterID",
column: x => x.MasterID,
principalTable: "JobPurchaseReturnJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "JobPutawayJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PoNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PoLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Item_Id = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Item_Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
Item_Desc2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPack_PackUom = table.Column<string>(type: "nvarchar(max)", nullable: true),
StdPack_PackQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
Status = table.Column<int>(type: "int", nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledBatch_SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledBatch_ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
HandledLot = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledLocationCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true),
HandledQty_Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
HandledQty_Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_JobPutawayJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_JobPutawayJobDetail_JobPutawayJob_MasterID",
column: x => x.MasterID,
principalTable: "JobPutawayJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_JobCheckJob_Company_Number",
table: "JobCheckJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobCheckJobDetail_MasterID",
table: "JobCheckJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobCountJob_Company_Number",
table: "JobCountJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobCountJobDetail_MasterID",
table: "JobCountJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobDeliverJob_Number_Company",
table: "JobDeliverJob",
columns: new[] { "Number", "Company" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobDeliverJobDetail_MasterID",
table: "JobDeliverJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobInspectJob_Company_Number",
table: "JobInspectJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobInspectJobDetail_MasterID",
table: "JobInspectJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobInspectJobSummaryDetail_MasterID",
table: "JobInspectJobSummaryDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobIssueJob_Company_Number",
table: "JobIssueJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobIssueJobDetail_MasterID",
table: "JobIssueJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobProductReceiveJob_Company_Number",
table: "JobProductReceiveJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobProductReceiveJobDetail_MasterID",
table: "JobProductReceiveJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobPurchaseReceiptJob_Company_Number",
table: "JobPurchaseReceiptJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobPurchaseReceiptJobDetail_MasterID",
table: "JobPurchaseReceiptJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobPurchaseReturnJob_Company_Number",
table: "JobPurchaseReturnJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobPurchaseReturnJobDetail_MasterID",
table: "JobPurchaseReturnJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_JobPutawayJob_Company_Number",
table: "JobPutawayJob",
columns: new[] { "Company", "Number" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_JobPutawayJobDetail_MasterID",
table: "JobPutawayJobDetail",
column: "MasterID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "JobCheckJobDetail");
migrationBuilder.DropTable(
name: "JobCountJobDetail");
migrationBuilder.DropTable(
name: "JobDeliverJobDetail");
migrationBuilder.DropTable(
name: "JobInspectJobDetail");
migrationBuilder.DropTable(
name: "JobInspectJobSummaryDetail");
migrationBuilder.DropTable(
name: "JobIssueJobDetail");
migrationBuilder.DropTable(
name: "JobProductReceiveJobDetail");
migrationBuilder.DropTable(
name: "JobPurchaseReceiptJobDetail");
migrationBuilder.DropTable(
name: "JobPurchaseReturnJobDetail");
migrationBuilder.DropTable(
name: "JobPutawayJobDetail");
migrationBuilder.DropTable(
name: "JobCheckJob");
migrationBuilder.DropTable(
name: "JobCountJob");
migrationBuilder.DropTable(
name: "JobDeliverJob");
migrationBuilder.DropTable(
name: "JobInspectJob");
migrationBuilder.DropTable(
name: "JobIssueJob");
migrationBuilder.DropTable(
name: "JobProductReceiveJob");
migrationBuilder.DropTable(
name: "JobPurchaseReceiptJob");
migrationBuilder.DropTable(
name: "JobPurchaseReturnJob");
migrationBuilder.DropTable(
name: "JobPutawayJob");
}
}
}