using System; using Microsoft.EntityFrameworkCore.Migrations; namespace ProductionLineMonitor.Web.Migrations { public partial class _202211031016 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "PowerConsumption", table: "MachineOutPutPerHours"); migrationBuilder.CreateTable( name: "MachinePowerConsumptions", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), MachineId = table.Column(type: "TEXT", nullable: true), DataTime = table.Column(type: "TEXT", nullable: false), PowerConsumption = table.Column(type: "REAL", nullable: false), Capacity = table.Column(type: "INTEGER", nullable: false), CreateTime = table.Column(type: "TEXT", nullable: true), UpdateTime = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MachinePowerConsumptions", x => x.Id); }); migrationBuilder.CreateTable( name: "MachineProcessBTs", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), MachineId = table.Column(type: "TEXT", nullable: true), No = table.Column(type: "INTEGER", nullable: false), BTAOI检测NG数 = table.Column(type: "INTEGER", nullable: false), BTAOI检查成功率 = table.Column(type: "INTEGER", nullable: false), BT贴附对位NG数 = table.Column(type: "INTEGER", nullable: false), BT贴附对位成功率 = table.Column(type: "INTEGER", nullable: false), 生产总数 = table.Column(type: "INTEGER", nullable: false), CreateTime = table.Column(type: "TEXT", nullable: true), UpdateTime = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MachineProcessBTs", x => x.Id); }); migrationBuilder.CreateTable( name: "MachineProcessFOGs", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), MachineId = table.Column(type: "TEXT", nullable: true), No = table.Column(type: "INTEGER", nullable: false), FPC拍照抛料总数 = table.Column(type: "INTEGER", nullable: false), FPC抛料率 = table.Column(type: "REAL", nullable: false), FPC抛料总数 = table.Column(type: "INTEGER", nullable: false), FPC真空抛料总数 = table.Column(type: "INTEGER", nullable: false), FPC总投入数 = table.Column(type: "INTEGER", nullable: false), 校正平台FPC拍照抛料数 = table.Column(type: "INTEGER", nullable: false), 校正平台FPC真空抛料数 = table.Column(type: "INTEGER", nullable: false), 预压头FPC拍照抛料数 = table.Column(type: "INTEGER", nullable: false), 预压头FPC真空抛料数 = table.Column(type: "INTEGER", nullable: false), CreateTime = table.Column(type: "TEXT", nullable: true), UpdateTime = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MachineProcessFOGs", x => x.Id); }); migrationBuilder.CreateTable( name: "MachineProcessPSEPDs", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), MachineId = table.Column(type: "TEXT", nullable: true), No = table.Column(type: "INTEGER", nullable: false), EPD二次撕膜数 = table.Column(type: "INTEGER", nullable: false), EPD撕膜NG数 = table.Column(type: "INTEGER", nullable: false), EPD撕膜成功率 = table.Column(type: "INTEGER", nullable: false), EPD撕膜数 = table.Column(type: "INTEGER", nullable: false), EPD一次撕膜数 = table.Column(type: "INTEGER", nullable: false), CreateTime = table.Column(type: "TEXT", nullable: true), UpdateTime = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MachineProcessPSEPDs", x => x.Id); }); migrationBuilder.CreateTable( name: "MachineProcessPSs", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), MachineId = table.Column(type: "TEXT", nullable: true), No = table.Column(type: "INTEGER", nullable: false), PS本体撕落抛料数 = table.Column(type: "INTEGER", nullable: false), PS放反抛料数 = table.Column(type: "INTEGER", nullable: false), PS拍照NG抛料数 = table.Column(type: "INTEGER", nullable: false), PS生产总数 = table.Column(type: "INTEGER", nullable: false), PS撕膜NG抛料数 = table.Column(type: "INTEGER", nullable: false), PS撕膜成功率 = table.Column(type: "INTEGER", nullable: false), PS撕膜总数 = table.Column(type: "INTEGER", nullable: false), PS贴附精度NG数 = table.Column(type: "INTEGER", nullable: false), PS真空异常抛料数 = table.Column(type: "INTEGER", nullable: false), CreateTime = table.Column(type: "TEXT", nullable: true), UpdateTime = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MachineProcessPSs", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "MachinePowerConsumptions"); migrationBuilder.DropTable( name: "MachineProcessBTs"); migrationBuilder.DropTable( name: "MachineProcessFOGs"); migrationBuilder.DropTable( name: "MachineProcessPSEPDs"); migrationBuilder.DropTable( name: "MachineProcessPSs"); migrationBuilder.AddColumn( name: "PowerConsumption", table: "MachineOutPutPerHours", type: "REAL", nullable: true); } } }