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.
503 lines
18 KiB
503 lines
18 KiB
3 weeks ago
|
using System;
|
||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
||
|
#nullable disable
|
||
|
|
||
|
namespace TaskManager.EntityFramework.Migrations
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
public partial class _2025052901 : Migration
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_ATTACHMENT_DATA");
|
||
|
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_ENVIRONMENT");
|
||
|
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_MATERIAL_DATA");
|
||
|
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE");
|
||
|
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_OEE_TIME_DETAILS");
|
||
|
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_PROCESS");
|
||
|
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "SUPPLIER_PRO_PROCESS_EQUIPMENT");
|
||
|
|
||
|
migrationBuilder.AlterColumn<string>(
|
||
|
name: "Remark",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "NVarchar(500)",
|
||
|
maxLength: 500,
|
||
|
nullable: false,
|
||
|
oldClrType: typeof(string),
|
||
|
oldType: "nvarchar(max)");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "CheryProductName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(100)",
|
||
|
maxLength: 100,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "CheryProductNo",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "CheryProductSn",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ClassOfName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "DefectsCode",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "DefectsDesc",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(255)",
|
||
|
maxLength: 255,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "DefectsLevel",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "CHAR(1)",
|
||
|
maxLength: 1,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "DefectsName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(100)",
|
||
|
maxLength: 100,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ManufactureNo",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<decimal>(
|
||
|
name: "Numberofdefect",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "DECIMAL(16,5)",
|
||
|
precision: 16,
|
||
|
scale: 5,
|
||
|
nullable: false,
|
||
|
defaultValue: 0m);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "PlantId",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "PlantName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ProductBatchNo",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ProductionLineId",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "ProductionLineName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "StationId",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "StationName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "StatisticalTime",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "CHAR(19)",
|
||
|
maxLength: 19,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "SupplierCode",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "SupplierName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "VendorProductBatch",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "VendorProductName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(100)",
|
||
|
maxLength: 100,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "VendorProductNo",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "VendorProductSn",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "WorkShift",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(10)",
|
||
|
maxLength: 10,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "WorkshopId",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(32)",
|
||
|
maxLength: 32,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "WorkshopName",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "VARCHAR(64)",
|
||
|
maxLength: 64,
|
||
|
nullable: false,
|
||
|
defaultValue: "");
|
||
|
}
|
||
|
|
||
|
/// <inheritdoc />
|
||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "CheryProductName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "CheryProductNo",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "CheryProductSn",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ClassOfName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DefectsCode",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DefectsDesc",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DefectsLevel",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "DefectsName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ManufactureNo",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Numberofdefect",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "PlantId",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "PlantName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ProductBatchNo",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ProductionLineId",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "ProductionLineName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "StationId",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "StationName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "StatisticalTime",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "SupplierCode",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "SupplierName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "VendorProductBatch",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "VendorProductName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "VendorProductNo",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "VendorProductSn",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "WorkShift",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "WorkshopId",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "WorkshopName",
|
||
|
table: "SUPPLIER_PRO_FLAW");
|
||
|
|
||
|
migrationBuilder.AlterColumn<string>(
|
||
|
name: "Remark",
|
||
|
table: "SUPPLIER_PRO_FLAW",
|
||
|
type: "nvarchar(max)",
|
||
|
nullable: false,
|
||
|
oldClrType: typeof(string),
|
||
|
oldType: "NVarchar(500)",
|
||
|
oldMaxLength: 500);
|
||
|
|
||
|
migrationBuilder.CreateTable(
|
||
|
name: "SUPPLIER_PRO_ATTACHMENT_DATA",
|
||
|
columns: table => new
|
||
|
{
|
||
|
UId = table.Column<long>(type: "bigint", nullable: false)
|
||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_SUPPLIER_PRO_ATTACHMENT_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"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_SUPPLIER_PRO_ENVIRONMENT", 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"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_SUPPLIER_PRO_MATERIAL_DATA", 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"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", 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"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_SUPPLIER_PRO_OEE_TIME_DETAILS", 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"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", 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"),
|
||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||
|
ReadState = table.Column<bool>(type: "bit", nullable: false),
|
||
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
|
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||
|
WriteState = table.Column<bool>(type: "bit", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS_EQUIPMENT", x => x.UId);
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|