You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1040 lines
63 KiB
1040 lines
63 KiB
3 weeks ago
|
using System;
|
||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
||
|
#nullable disable
|
||
|
|
||
|
namespace CherryTaskManager.Migrations
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
public partial class Init : Migration
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.CreateTable(
|
||
|
name: "SUPPLIER_BOM",
|
||
|
columns: table => new
|
||
|
{
|
||
|
UId = table.Column<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
SupplierCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ReleaseEdition = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
FeedbackResults = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VentureType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VentureSpecific = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Measures = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
StartDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityMeet1 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet2 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet3 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet4 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet5 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet6 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet7 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet8 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet9 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet10 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet11 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet12 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet13 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet14 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet15 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet16 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet17 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet18 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet19 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet20 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet21 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet22 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet23 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet24 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet25 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet26 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet27 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet28 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet29 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet30 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet31 = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
SupplierCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ReleaseEdition = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
FeedbackResults = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VentureType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VentureSpecific = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Measures = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
StartMonth = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityMeet1 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet2 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet3 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet4 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet5 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet6 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet7 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet8 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet9 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet10 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet11 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityMeet12 = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
SupplierCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PurchaseOrder = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityMeet = table.Column<int>(type: "int", nullable: false),
|
||
|
FeedbackResults = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VentureType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VentureSpecific = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Measures = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
DeliveryNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialSrate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ReceivingCrossings = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDelivery = table.Column<int>(type: "int", nullable: false),
|
||
|
DataCreateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SupplierReceiveTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
RoadShippedTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
RoadReceiveTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityCurrent = table.Column<int>(type: "int", nullable: false),
|
||
|
StockState = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DataUpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
ReleaseEdition = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
StartDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDemand1 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand2 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand3 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand4 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand5 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand6 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand7 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand8 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand9 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand10 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand11 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand12 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand13 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand14 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand15 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand16 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand17 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand18 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand19 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand20 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand21 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand22 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand23 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand24 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand25 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand26 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand27 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand28 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand29 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand30 = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDemand31 = table.Column<int>(type: "int", nullable: false),
|
||
|
IsUpdate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
ReleaseEdition = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
StartMonth = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDemand1 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand2 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand3 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand4 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand5 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand6 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand7 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand8 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand9 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand10 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand11 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
QuantityDemand12 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||
|
IsUpdate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DemandSrate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DemandType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SummarySign = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DateRequired = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDemand = table.Column<int>(type: "int", nullable: false),
|
||
|
ConfirmTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreatQuantity = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityDelivery = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityReceive = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityInTransit = table.Column<int>(type: "int", nullable: false),
|
||
|
OnTimePercentage = table.Column<int>(type: "int", nullable: false),
|
||
|
SummaryCreatQuantity = table.Column<int>(type: "int", nullable: false),
|
||
|
SummaryQuantityDelivery = table.Column<int>(type: "int", nullable: false),
|
||
|
SummaryQuantityReceive = table.Column<int>(type: "int", nullable: false),
|
||
|
SummaryQuantityInTransit = table.Column<int>(type: "int", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
PurchaseOrder = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
VoucherDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Purchaser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Supplier = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDemand = table.Column<int>(type: "int", nullable: false),
|
||
|
MaterialUnit = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DeliveryDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DeliveryPlace = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDelivery = table.Column<int>(type: "int", nullable: false),
|
||
|
Note = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ItemType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TradeTerms = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Country = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
Models = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Vin = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionLineId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionLineName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SortDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SortTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
OnLineDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
OnLineTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ModelCategory = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
AssemblyMaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MotorMaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Plant = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
Models = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Vin = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionLineId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionLineName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
OnLineTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Models = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Quantity1 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||
|
Quantity2 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||
|
StartMonth = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Pattern = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Omterior = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SalseDepartment = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||
|
Type = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Quantity3 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||
|
ReleaseEdition = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Quantity4 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
Quantity5 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||
|
Quantity6 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||
|
Plant = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Assembly = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Id = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
Models = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Vin = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionLineId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ProductionLineName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
OnLineTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
FinalWorkshop = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
FinalOnLineTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
ReturnNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialSrate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PickUpLocation = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DemandPickupTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PickUpCrossings = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Feedback = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Plant = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDelivery = table.Column<int>(type: "int", nullable: false),
|
||
|
ReturnType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
LotNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Judge = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
ReturnReason = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Id = table.Column<int>(type: "int", nullable: false),
|
||
|
ScheduleAgreement = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PurchasingGroup = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
PlantId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityDemand = table.Column<int>(type: "int", nullable: false),
|
||
|
DateReceived = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
UpdateByUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
IsDelete = table.Column<int>(type: "int", nullable: false),
|
||
|
Version = table.Column<int>(type: "int", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
SupplierCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SupplierName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
MaterialType = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
QuantityCurrent = table.Column<int>(type: "int", nullable: false),
|
||
|
QuantityPlan = table.Column<int>(type: "int", nullable: false),
|
||
|
InventoryStatus = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SafetyStock = table.Column<int>(type: "int", nullable: false),
|
||
|
ProductionCycle = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
DataUpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SupplierBatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
SupplieryxqDate = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(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<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Api = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Corn = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Module = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TableName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Url = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
IsAuto = table.Column<bool>(type: "bit", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_TaskConifgure", x => x.UId);
|
||
|
});
|
||
|
|
||
|
migrationBuilder.CreateTable(
|
||
|
name: "TaskLogs",
|
||
|
columns: table => new
|
||
|
{
|
||
|
UId = table.Column<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
Info = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
Type = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_TaskLogs", x => x.UId);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/// <inheritdoc />
|
||
|
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");
|
||
|
}
|
||
|
}
|
||
|
}
|