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