using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace TaskManager.EntityFramework.Migrations { /// public partial class _2025052901 : Migration { /// 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( name: "Remark", table: "SUPPLIER_PRO_FLAW", type: "NVarchar(500)", maxLength: 500, nullable: false, oldClrType: typeof(string), oldType: "nvarchar(max)"); migrationBuilder.AddColumn( name: "CheryProductName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(100)", maxLength: 100, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "CheryProductNo", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "CheryProductSn", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ClassOfName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "DefectsCode", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "DefectsDesc", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(255)", maxLength: 255, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "DefectsLevel", table: "SUPPLIER_PRO_FLAW", type: "CHAR(1)", maxLength: 1, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "DefectsName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(100)", maxLength: 100, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ManufactureNo", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "Numberofdefect", table: "SUPPLIER_PRO_FLAW", type: "DECIMAL(16,5)", precision: 16, scale: 5, nullable: false, defaultValue: 0m); migrationBuilder.AddColumn( name: "PlantId", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "PlantName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ProductBatchNo", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ProductionLineId", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "ProductionLineName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "StationId", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "StationName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "StatisticalTime", table: "SUPPLIER_PRO_FLAW", type: "CHAR(19)", maxLength: 19, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SupplierCode", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "SupplierName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "VendorProductBatch", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "VendorProductName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(100)", maxLength: 100, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "VendorProductNo", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "VendorProductSn", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "WorkShift", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(10)", maxLength: 10, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "WorkshopId", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(32)", maxLength: 32, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "WorkshopName", table: "SUPPLIER_PRO_FLAW", type: "VARCHAR(64)", maxLength: 64, nullable: false, defaultValue: ""); } /// 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( 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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(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(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CreationTime = table.Column(type: "datetime2", nullable: false), ReadState = table.Column(type: "bit", nullable: false), Remark = table.Column(type: "nvarchar(max)", nullable: false), TaskId = table.Column(type: "uniqueidentifier", nullable: false), WriteState = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SUPPLIER_PRO_PROCESS_EQUIPMENT", x => x.UId); }); } } }