using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CherryTaskManager.Migrations { /// public partial class Init : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "SUPPLIER_BOM", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_BOM", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_CON_DATE", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SupplierCode = table.Column(type: "nvarchar(max)", nullable: false), ReleaseEdition = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), FeedbackResults = table.Column(type: "nvarchar(max)", nullable: false), VentureType = table.Column(type: "nvarchar(max)", nullable: false), VentureSpecific = table.Column(type: "nvarchar(max)", nullable: false), Measures = table.Column(type: "nvarchar(max)", nullable: false), StartDate = table.Column(type: "nvarchar(max)", nullable: false), QuantityMeet1 = table.Column(type: "int", nullable: false), QuantityMeet2 = table.Column(type: "int", nullable: false), QuantityMeet3 = table.Column(type: "int", nullable: false), QuantityMeet4 = table.Column(type: "int", nullable: false), QuantityMeet5 = table.Column(type: "int", nullable: false), QuantityMeet6 = table.Column(type: "int", nullable: false), QuantityMeet7 = table.Column(type: "int", nullable: false), QuantityMeet8 = table.Column(type: "int", nullable: false), QuantityMeet9 = table.Column(type: "int", nullable: false), QuantityMeet10 = table.Column(type: "int", nullable: false), QuantityMeet11 = table.Column(type: "int", nullable: false), QuantityMeet12 = table.Column(type: "int", nullable: false), QuantityMeet13 = table.Column(type: "int", nullable: false), QuantityMeet14 = table.Column(type: "int", nullable: false), QuantityMeet15 = table.Column(type: "int", nullable: false), QuantityMeet16 = table.Column(type: "int", nullable: false), QuantityMeet17 = table.Column(type: "int", nullable: false), QuantityMeet18 = table.Column(type: "int", nullable: false), QuantityMeet19 = table.Column(type: "int", nullable: false), QuantityMeet20 = table.Column(type: "int", nullable: false), QuantityMeet21 = table.Column(type: "int", nullable: false), QuantityMeet22 = table.Column(type: "int", nullable: false), QuantityMeet23 = table.Column(type: "int", nullable: false), QuantityMeet24 = table.Column(type: "int", nullable: false), QuantityMeet25 = table.Column(type: "int", nullable: false), QuantityMeet26 = table.Column(type: "int", nullable: false), QuantityMeet27 = table.Column(type: "int", nullable: false), QuantityMeet28 = table.Column(type: "int", nullable: false), QuantityMeet29 = table.Column(type: "int", nullable: false), QuantityMeet30 = table.Column(type: "int", nullable: false), QuantityMeet31 = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_CON_DATE", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_CON_MMRP", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SupplierCode = table.Column(type: "nvarchar(max)", nullable: false), ReleaseEdition = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), FeedbackResults = table.Column(type: "nvarchar(max)", nullable: false), VentureType = table.Column(type: "nvarchar(max)", nullable: false), VentureSpecific = table.Column(type: "nvarchar(max)", nullable: false), Measures = table.Column(type: "nvarchar(max)", nullable: false), StartMonth = table.Column(type: "nvarchar(max)", nullable: false), QuantityMeet1 = table.Column(type: "int", nullable: false), QuantityMeet2 = table.Column(type: "int", nullable: false), QuantityMeet3 = table.Column(type: "int", nullable: false), QuantityMeet4 = table.Column(type: "int", nullable: false), QuantityMeet5 = table.Column(type: "int", nullable: false), QuantityMeet6 = table.Column(type: "int", nullable: false), QuantityMeet7 = table.Column(type: "int", nullable: false), QuantityMeet8 = table.Column(type: "int", nullable: false), QuantityMeet9 = table.Column(type: "int", nullable: false), QuantityMeet10 = table.Column(type: "int", nullable: false), QuantityMeet11 = table.Column(type: "int", nullable: false), QuantityMeet12 = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_CON_MMRP", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_CON_PO", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SupplierCode = table.Column(type: "nvarchar(max)", nullable: false), PurchaseOrder = table.Column(type: "nvarchar(max)", nullable: false), SerialNumber = table.Column(type: "nvarchar(max)", nullable: false), QuantityMeet = table.Column(type: "int", nullable: false), FeedbackResults = table.Column(type: "nvarchar(max)", nullable: false), VentureType = table.Column(type: "nvarchar(max)", nullable: false), VentureSpecific = table.Column(type: "nvarchar(max)", nullable: false), Measures = table.Column(type: "nvarchar(max)", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_CON_PO", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_DEL_STATE", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), DeliveryNumber = table.Column(type: "nvarchar(max)", nullable: false), SerialNumber = table.Column(type: "nvarchar(max)", nullable: false), SerialSrate = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), ReceivingCrossings = table.Column(type: "nvarchar(max)", nullable: false), QuantityDelivery = table.Column(type: "int", nullable: false), DataCreateTime = table.Column(type: "nvarchar(max)", nullable: false), SupplierReceiveTime = table.Column(type: "nvarchar(max)", nullable: false), RoadShippedTime = table.Column(type: "nvarchar(max)", nullable: false), RoadReceiveTime = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_DEL_STATE", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_EMPLOYEE", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_EMPLOYEE", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_INFO", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_INFO", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_INV_DATA", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), PlantName = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), QuantityCurrent = table.Column(type: "int", nullable: false), StockState = table.Column(type: "nvarchar(max)", nullable: false), DataUpdateTime = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_INV_DATA", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_MRP_DATE", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), ReleaseEdition = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), PlantName = table.Column(type: "nvarchar(max)", nullable: false), StartDate = table.Column(type: "nvarchar(max)", nullable: false), QuantityDemand1 = table.Column(type: "int", nullable: false), QuantityDemand2 = table.Column(type: "int", nullable: false), QuantityDemand3 = table.Column(type: "int", nullable: false), QuantityDemand4 = table.Column(type: "int", nullable: false), QuantityDemand5 = table.Column(type: "int", nullable: false), QuantityDemand6 = table.Column(type: "int", nullable: false), QuantityDemand7 = table.Column(type: "int", nullable: false), QuantityDemand8 = table.Column(type: "int", nullable: false), QuantityDemand9 = table.Column(type: "int", nullable: false), QuantityDemand10 = table.Column(type: "int", nullable: false), QuantityDemand11 = table.Column(type: "int", nullable: false), QuantityDemand12 = table.Column(type: "int", nullable: false), QuantityDemand13 = table.Column(type: "int", nullable: false), QuantityDemand14 = table.Column(type: "int", nullable: false), QuantityDemand15 = table.Column(type: "int", nullable: false), QuantityDemand16 = table.Column(type: "int", nullable: false), QuantityDemand17 = table.Column(type: "int", nullable: false), QuantityDemand18 = table.Column(type: "int", nullable: false), QuantityDemand19 = table.Column(type: "int", nullable: false), QuantityDemand20 = table.Column(type: "int", nullable: false), QuantityDemand21 = table.Column(type: "int", nullable: false), QuantityDemand22 = table.Column(type: "int", nullable: false), QuantityDemand23 = table.Column(type: "int", nullable: false), QuantityDemand24 = table.Column(type: "int", nullable: false), QuantityDemand25 = table.Column(type: "int", nullable: false), QuantityDemand26 = table.Column(type: "int", nullable: false), QuantityDemand27 = table.Column(type: "int", nullable: false), QuantityDemand28 = table.Column(type: "int", nullable: false), QuantityDemand29 = table.Column(type: "int", nullable: false), QuantityDemand30 = table.Column(type: "int", nullable: false), QuantityDemand31 = table.Column(type: "int", nullable: false), IsUpdate = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "nvarchar(max)", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "nvarchar(max)", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_MRP_DATE", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_MRP_MONTH", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), ReleaseEdition = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), PlantName = table.Column(type: "nvarchar(max)", nullable: false), StartMonth = table.Column(type: "nvarchar(max)", nullable: false), QuantityDemand1 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand2 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand3 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand4 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand5 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand6 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand7 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand8 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand9 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand10 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand11 = table.Column(type: "decimal(18,2)", nullable: false), QuantityDemand12 = table.Column(type: "decimal(18,2)", nullable: false), IsUpdate = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "nvarchar(max)", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_MRP_MONTH", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_MRP_STATE", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), PlantName = table.Column(type: "nvarchar(max)", nullable: false), DemandSrate = table.Column(type: "nvarchar(max)", nullable: false), DemandType = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), SummarySign = table.Column(type: "nvarchar(max)", nullable: false), DateRequired = table.Column(type: "nvarchar(max)", nullable: false), QuantityDemand = table.Column(type: "int", nullable: false), ConfirmTime = table.Column(type: "nvarchar(max)", nullable: false), CreatQuantity = table.Column(type: "int", nullable: false), QuantityDelivery = table.Column(type: "int", nullable: false), QuantityReceive = table.Column(type: "int", nullable: false), QuantityInTransit = table.Column(type: "int", nullable: false), OnTimePercentage = table.Column(type: "int", nullable: false), SummaryCreatQuantity = table.Column(type: "int", nullable: false), SummaryQuantityDelivery = table.Column(type: "int", nullable: false), SummaryQuantityReceive = table.Column(type: "int", nullable: false), SummaryQuantityInTransit = table.Column(type: "int", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_MRP_STATE", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PO", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), PurchaseOrder = table.Column(type: "nvarchar(max)", nullable: false), SerialNumber = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), PlantName = table.Column(type: "nvarchar(max)", nullable: false), VoucherDate = table.Column(type: "nvarchar(max)", nullable: false), Purchaser = table.Column(type: "nvarchar(max)", nullable: false), Supplier = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), QuantityDemand = table.Column(type: "int", nullable: false), MaterialUnit = table.Column(type: "nvarchar(max)", nullable: false), DeliveryDate = table.Column(type: "nvarchar(max)", nullable: false), DeliveryPlace = table.Column(type: "nvarchar(max)", nullable: false), QuantityDelivery = table.Column(type: "int", nullable: false), Note = table.Column(type: "nvarchar(max)", nullable: false), ItemType = table.Column(type: "nvarchar(max)", nullable: false), TradeTerms = table.Column(type: "nvarchar(max)", nullable: false), Country = table.Column(type: "nvarchar(max)", nullable: false), Batch = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "nvarchar(max)", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "nvarchar(max)", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PO", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_ATTACHMENT_DATA", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_ATTACHMENT_DATA", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_CPS", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_CPS", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_CSCHEDUL", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), Models = table.Column(type: "nvarchar(max)", nullable: false), Vin = table.Column(type: "nvarchar(max)", nullable: false), ProductionLineId = table.Column(type: "nvarchar(max)", nullable: false), ProductionLineName = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), SortDate = table.Column(type: "nvarchar(max)", nullable: false), SortTime = table.Column(type: "nvarchar(max)", nullable: false), OnLineDate = table.Column(type: "nvarchar(max)", nullable: false), OnLineTime = table.Column(type: "nvarchar(max)", nullable: false), ModelCategory = table.Column(type: "nvarchar(max)", nullable: false), AssemblyMaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MotorMaterialCode = table.Column(type: "nvarchar(max)", nullable: false), Plant = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_CSCHEDUL", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_DATA", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_DATA", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_ENVIRONMENT", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_ENVIRONMENT", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_FIRST_PASSYIELD", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_FIRST_PASSYIELD", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_FLAW", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_FLAW", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_HSCHEDUL", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), Models = table.Column(type: "nvarchar(max)", nullable: false), Vin = table.Column(type: "nvarchar(max)", nullable: false), ProductionLineId = table.Column(type: "nvarchar(max)", nullable: false), ProductionLineName = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), ProductionType = table.Column(type: "nvarchar(max)", nullable: false), OnLineTime = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_HSCHEDUL", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_MATERIAL_DATA", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_MATERIAL_DATA", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_MATERIAL_STOCK", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_MATERIAL_STOCK", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_OEE_TIME_DETAILS", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_OEE_TIME_DETAILS", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_PLANING", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Models = table.Column(type: "nvarchar(max)", nullable: false), Quantity1 = table.Column(type: "decimal(18,2)", nullable: true), Quantity2 = table.Column(type: "decimal(18,2)", nullable: true), StartMonth = table.Column(type: "nvarchar(max)", nullable: false), IsDelete = table.Column(type: "int", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), Pattern = table.Column(type: "nvarchar(max)", nullable: false), Omterior = table.Column(type: "nvarchar(max)", nullable: false), SalseDepartment = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: true), Type = table.Column(type: "nvarchar(max)", nullable: false), Quantity3 = table.Column(type: "decimal(18,2)", nullable: true), ReleaseEdition = table.Column(type: "nvarchar(max)", nullable: false), Quantity4 = table.Column(type: "decimal(18,2)", nullable: true), Version = table.Column(type: "int", nullable: false), Quantity5 = table.Column(type: "decimal(18,2)", nullable: true), Quantity6 = table.Column(type: "decimal(18,2)", nullable: true), CreateTime = table.Column(type: "datetime2", nullable: true), Plant = table.Column(type: "nvarchar(max)", nullable: false), Assembly = table.Column(type: "nvarchar(max)", nullable: false), Id = table.Column(type: "nvarchar(max)", nullable: true), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_PLANING", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_PROCESS", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_PROCESS_EQUIPMENT", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS_EQUIPMENT", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_SCHEDULING", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_SCHEDULING", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_STATION_FIRST_PASSYIELD", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_STATION_FIRST_PASSYIELD", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_PRO_TSCHEDUL", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), Models = table.Column(type: "nvarchar(max)", nullable: false), Vin = table.Column(type: "nvarchar(max)", nullable: false), ProductionLineId = table.Column(type: "nvarchar(max)", nullable: false), ProductionLineName = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), OnLineTime = table.Column(type: "nvarchar(max)", nullable: false), FinalWorkshop = table.Column(type: "nvarchar(max)", nullable: false), FinalOnLineTime = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_TSCHEDUL", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_RETURN", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), ReturnNumber = table.Column(type: "nvarchar(max)", nullable: false), SerialNumber = table.Column(type: "nvarchar(max)", nullable: false), SerialSrate = table.Column(type: "nvarchar(max)", nullable: false), PickUpLocation = table.Column(type: "nvarchar(max)", nullable: false), DemandPickupTime = table.Column(type: "nvarchar(max)", nullable: false), PickUpCrossings = table.Column(type: "nvarchar(max)", nullable: false), Feedback = table.Column(type: "nvarchar(max)", nullable: false), Plant = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), QuantityDelivery = table.Column(type: "int", nullable: false), ReturnType = table.Column(type: "nvarchar(max)", nullable: false), LotNumber = table.Column(type: "nvarchar(max)", nullable: false), Judge = table.Column(type: "nvarchar(max)", nullable: false), ReturnReason = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_RETURN", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_SA_WEEK", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Id = table.Column(type: "int", nullable: false), ScheduleAgreement = table.Column(type: "nvarchar(max)", nullable: false), SerialNumber = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), PurchasingGroup = table.Column(type: "nvarchar(max)", nullable: false), PlantId = table.Column(type: "nvarchar(max)", nullable: false), QuantityDemand = table.Column(type: "int", nullable: false), DateReceived = table.Column(type: "nvarchar(max)", nullable: false), CreateByUser = table.Column(type: "nvarchar(max)", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateByUser = table.Column(type: "nvarchar(max)", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: false), IsDelete = table.Column(type: "int", nullable: false), Version = table.Column(type: "int", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_SA_WEEK", x => x.UId); }); migrationBuilder.CreateTable( name: "SUPPLIER_SINV_DATA", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SupplierCode = table.Column(type: "nvarchar(max)", nullable: false), SupplierName = table.Column(type: "nvarchar(max)", nullable: false), MaterialCode = table.Column(type: "nvarchar(max)", nullable: false), MaterialDescription = table.Column(type: "nvarchar(max)", nullable: false), MaterialType = table.Column(type: "nvarchar(max)", nullable: false), QuantityCurrent = table.Column(type: "int", nullable: false), QuantityPlan = table.Column(type: "int", nullable: false), InventoryStatus = table.Column(type: "nvarchar(max)", nullable: false), SafetyStock = table.Column(type: "int", nullable: false), ProductionCycle = table.Column(type: "nvarchar(max)", nullable: false), DataUpdateTime = table.Column(type: "nvarchar(max)", nullable: false), SupplierBatch = table.Column(type: "nvarchar(max)", nullable: false), SupplieryxqDate = table.Column(type: "nvarchar(max)", nullable: false), WriteState = table.Column(type: "bit", nullable: false), ReadState = table.Column(type: "bit", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_SINV_DATA", x => x.UId); }); migrationBuilder.CreateTable( name: "TaskConifgure", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Api = table.Column(type: "nvarchar(max)", nullable: false), Corn = table.Column(type: "nvarchar(max)", nullable: false), Module = table.Column(type: "nvarchar(max)", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TableName = table.Column(type: "nvarchar(max)", nullable: false), TaskName = table.Column(type: "nvarchar(max)", nullable: false), Url = table.Column(type: "nvarchar(max)", nullable: false), IsAuto = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TaskConifgure", x => x.UId); }); migrationBuilder.CreateTable( name: "TaskLogs", columns: table => new { UId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Info = table.Column(type: "nvarchar(max)", nullable: false), Type = table.Column(type: "nvarchar(max)", nullable: false), TaskName = table.Column(type: "nvarchar(max)", nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TaskLogs", x => x.UId); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "SUPPLIER_BOM"); migrationBuilder.DropTable( name: "SUPPLIER_CON_DATE"); migrationBuilder.DropTable( name: "SUPPLIER_CON_MMRP"); migrationBuilder.DropTable( name: "SUPPLIER_CON_PO"); migrationBuilder.DropTable( name: "SUPPLIER_DEL_STATE"); migrationBuilder.DropTable( name: "SUPPLIER_EMPLOYEE"); migrationBuilder.DropTable( name: "SUPPLIER_INFO"); migrationBuilder.DropTable( name: "SUPPLIER_INV_DATA"); migrationBuilder.DropTable( name: "SUPPLIER_MRP_DATE"); migrationBuilder.DropTable( name: "SUPPLIER_MRP_MONTH"); migrationBuilder.DropTable( name: "SUPPLIER_MRP_STATE"); migrationBuilder.DropTable( name: "SUPPLIER_PO"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_ATTACHMENT_DATA"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_CPS"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_CSCHEDUL"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_DATA"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_ENVIRONMENT"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_FIRST_PASSYIELD"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_FLAW"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_HSCHEDUL"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_MATERIAL_DATA"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_MATERIAL_STOCK"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_OEE_TIME_DETAILS"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_PLANING"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_PROCESS"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_PROCESS_EQUIPMENT"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_SCHEDULING"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_STATION_FIRST_PASSYIELD"); migrationBuilder.DropTable( name: "SUPPLIER_PRO_TSCHEDUL"); migrationBuilder.DropTable( name: "SUPPLIER_RETURN"); migrationBuilder.DropTable( name: "SUPPLIER_SA_WEEK"); migrationBuilder.DropTable( name: "SUPPLIER_SINV_DATA"); migrationBuilder.DropTable( name: "TaskConifgure"); migrationBuilder.DropTable( name: "TaskLogs"); } } }