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(type: "uniqueidentifier", nullable: false), DeliverNoteNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobCheckJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobCountJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), CountPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CountStage = table.Column(type: "int", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobCountJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobDeliverJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), DeliverRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Customer = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobDeliverJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobInspectJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ArriveNoticeNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), SupplierCode = table.Column(type: "nvarchar(max)", nullable: true), NextAction = table.Column(type: "int", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobInspectJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobIssueJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), MaterialRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobIssueJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobProductReceiveJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), ProductionPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Shift = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobProductReceiveJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobPurchaseReceiptJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), ArriveNoticeNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), SupplierName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Type = table.Column(type: "int", nullable: false), TimeWindow = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobPurchaseReceiptJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobPurchaseReturnJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), ArriveNoticeNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PurchaseReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobPurchaseReturnJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobPutawayJob", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ArriveNoticeNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ProductReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Company = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Worker = table.Column(type: "nvarchar(max)", nullable: true), WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), JobType = table.Column(type: "int", nullable: false), JobStatus = table.Column(type: "int", nullable: false), Priority = table.Column(type: "int", nullable: false, defaultValue: 0), PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), AcceptTime = table.Column(type: "datetime2", nullable: true), CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CompleteTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_JobPutawayJob", x => x.Id); }); migrationBuilder.CreateTable( name: "JobCheckJobDetail", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Order = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CustomerItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Qty_Uom = table.Column(type: "nvarchar(max)", nullable: true), Qty_Qty = table.Column(type: "decimal(18,2)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Batch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), Batch_ProduceDate = table.Column(type: "datetime2", nullable: true), LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), WarehouseCode = table.Column(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(type: "uniqueidentifier", nullable: false), CountLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), InventoryQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), InventoryQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), CountQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), CountQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Batch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), Batch_ProduceDate = table.Column(type: "datetime2", nullable: true), LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), WarehouseCode = table.Column(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(type: "uniqueidentifier", nullable: false), FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ExpiredTime = table.Column(type: "datetime2", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), InspectType = table.Column(type: "int", nullable: false), SamplePercent = table.Column(type: "decimal(18,2)", nullable: false), ReceiveQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), ReceiveQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), InspectQty = table.Column(type: "decimal(18,2)", nullable: false), GoodQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), FailedReason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), FailedQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), CrackQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), InspectUser_Name = table.Column(type: "nvarchar(max)", nullable: true), InspectUser_Phone = table.Column(type: "nvarchar(max)", nullable: true), InspectUser_Email = table.Column(type: "nvarchar(max)", nullable: true), NotPassedQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), InspectType = table.Column(type: "int", nullable: false), SamplePercent = table.Column(type: "decimal(18,2)", nullable: false), ReceiveQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), ReceiveQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), InspectQty = table.Column(type: "decimal(18,2)", nullable: false), GoodQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), FailedReason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), FailedQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), CrackQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), InspectUser_Name = table.Column(type: "nvarchar(max)", nullable: true), InspectUser_Phone = table.Column(type: "nvarchar(max)", nullable: true), InspectUser_Email = table.Column(type: "nvarchar(max)", nullable: true), NotPassedQty = table.Column(type: "decimal(18,2)", nullable: false, defaultValue: 0m), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), RequestLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ExpiredTime = table.Column(type: "datetime2", nullable: false), Operation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), DistributionType = table.Column(type: "int", nullable: false), TruncType = table.Column(type: "int", nullable: false), RoundedQty = table.Column(type: "decimal(18,2)", nullable: false), PlannedSplitRule = table.Column(type: "int", nullable: false), PlanBeginTime = table.Column(type: "datetime2", nullable: false), DeliveryQty = table.Column(type: "decimal(18,2)", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), RawLocation = table.Column(type: "nvarchar(max)", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), PoNumber = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), PoLine = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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(type: "uniqueidentifier", nullable: false), PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), MasterID = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Remark = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Item_Id = table.Column(type: "uniqueidentifier", nullable: true), Item_Name = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc1 = table.Column(type: "nvarchar(max)", nullable: true), Item_Desc2 = table.Column(type: "nvarchar(max)", nullable: true), ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), StdPack_PackUom = table.Column(type: "nvarchar(max)", nullable: true), StdPack_PackQty = table.Column(type: "decimal(18,2)", nullable: true), Status = table.Column(type: "int", nullable: false), RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), RecommendBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), RecommendQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), RecommendQty_Qty = table.Column(type: "decimal(18,2)", nullable: true), HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), HandledBatch_SupplierBatch = table.Column(type: "nvarchar(max)", nullable: true), HandledBatch_ProduceDate = table.Column(type: "datetime2", nullable: true), HandledLot = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledLocationCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), HandledQty_Uom = table.Column(type: "nvarchar(max)", nullable: true), HandledQty_Qty = table.Column(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"); } } }