using System; using Microsoft.EntityFrameworkCore.Migrations; namespace ProductionLineMonitor.Web.Migrations { public partial class _202210242006 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Cims", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), Topic = table.Column(type: "TEXT", nullable: true), Time = table.Column(type: "TEXT", nullable: false), IpAddress = table.Column(type: "TEXT", nullable: true), User = table.Column(type: "TEXT", nullable: true), PLCIsConnected = table.Column(type: "INTEGER", nullable: false), EAPIsConnected = 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_Cims", x => x.Id); }); migrationBuilder.CreateTable( name: "MachineStatistics", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), MachineId = table.Column(type: "TEXT", nullable: true), Date = table.Column(type: "TEXT", nullable: false), ModuleType = table.Column(type: "TEXT", nullable: true), TT = table.Column(type: "INTEGER", nullable: true), Capacity = table.Column(type: "INTEGER", nullable: true), Availability = table.Column(type: "REAL", nullable: true), Performance = table.Column(type: "REAL", nullable: true), Quality = table.Column(type: "REAL", nullable: true), OEE = table.Column(type: "REAL", nullable: true), CreateTime = table.Column(type: "TEXT", nullable: true), UpdateTime = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MachineStatistics", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Cims"); migrationBuilder.DropTable( name: "MachineStatistics"); } } }