using System; using Microsoft.EntityFrameworkCore.Migrations; namespace WCS.Service.Migrations { public partial class Init : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "WCS_CMD", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DEVICE_CODE = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), PROTOCOL = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), PROPERTY = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true), VALUE = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), WCSVERSION = table.Column(type: "int", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true) }, constraints: table => { table.PrimaryKey("PK_WCS_CMD", x => x.ID); }); migrationBuilder.CreateTable( name: "WCS_DEVICE", columns: table => new { CODE = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), NAME = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), TYPE = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true) }, constraints: table => { table.PrimaryKey("PK_WCS_DEVICE", x => x.CODE); }); migrationBuilder.CreateTable( name: "WCS_EXCEPTION", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), MSG = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), STARTTIME = table.Column(type: "datetime2", nullable: false), TIMES = table.Column(type: "int", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true) }, constraints: table => { table.PrimaryKey("PK_WCS_EXCEPTION", x => x.ID); }); migrationBuilder.CreateTable( name: "WCS_PLC", columns: table => new { CODE = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), NAME = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), IP = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), PORT = table.Column(type: "int", nullable: false), SLOT = table.Column(type: "int", nullable: false), RACK = table.Column(type: "int", nullable: false), TYPE = table.Column(type: "int", nullable: false), MODEL = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: true), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true) }, constraints: table => { table.PrimaryKey("PK_WCS_PLC", x => x.CODE); }); migrationBuilder.CreateTable( name: "WCS_BCR80", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CONTENT = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_BCR80", x => x.ID); table.ForeignKey( name: "FK_WCS_BCR80_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_RGV520", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), TaskID_1 = table.Column(type: "int", nullable: false), TaskType_1 = table.Column(type: "smallint", nullable: false), StartPosition_1 = table.Column(type: "smallint", nullable: false), DestPosition_1 = table.Column(type: "smallint", nullable: false), PRIORITY_1 = table.Column(type: "smallint", nullable: false), RES1_1 = table.Column(type: "smallint", nullable: false), RES2_1 = table.Column(type: "smallint", nullable: false), Trigger_1 = table.Column(type: "smallint", nullable: false), TaskID_2 = table.Column(type: "int", nullable: false), TaskType_2 = table.Column(type: "smallint", nullable: false), StartPosition_2 = table.Column(type: "smallint", nullable: false), DestPosition_2 = table.Column(type: "smallint", nullable: false), PRIORITY_2 = table.Column(type: "smallint", nullable: false), RES1_2 = table.Column(type: "smallint", nullable: false), RES2_2 = table.Column(type: "smallint", nullable: false), Trigger_2 = table.Column(type: "smallint", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_RGV520", x => x.ID); table.ForeignKey( name: "FK_WCS_RGV520_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_RGV521", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), TaskID_1 = table.Column(type: "int", nullable: false), TaskType_1 = table.Column(type: "smallint", nullable: false), StartPosition_1 = table.Column(type: "smallint", nullable: false), DestPosition_1 = table.Column(type: "smallint", nullable: false), PRIORITY_1 = table.Column(type: "smallint", nullable: false), ACT_V = table.Column(type: "smallint", nullable: false), RES2_1 = table.Column(type: "smallint", nullable: false), PH_Status_1 = table.Column(type: "bit", nullable: false), ToSition_1 = table.Column(type: "bit", nullable: false), Finish_1 = table.Column(type: "bit", nullable: false), TaskID_2 = table.Column(type: "int", nullable: false), TaskType_2 = table.Column(type: "smallint", nullable: false), StartPosition_2 = table.Column(type: "smallint", nullable: false), DestPosition_2 = table.Column(type: "smallint", nullable: false), PRIORITY_2 = table.Column(type: "smallint", nullable: false), RES1_2 = table.Column(type: "smallint", nullable: false), RES2_2 = table.Column(type: "smallint", nullable: false), PH_Status_2 = table.Column(type: "bit", nullable: false), ToSition_2 = table.Column(type: "bit", nullable: false), Finish_2 = table.Column(type: "bit", nullable: false), SystemStatus = table.Column(type: "smallint", nullable: false), WorkMode = table.Column(type: "smallint", nullable: false), RES = table.Column(type: "smallint", nullable: false), Position = table.Column(type: "real", nullable: false), Mileage = table.Column(type: "real", nullable: false), Runtime = table.Column(type: "real", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_RGV521", x => x.ID); table.ForeignKey( name: "FK_WCS_RGV521_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_RGV523", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Fault = table.Column(type: "int", nullable: false), Fault1 = table.Column(type: "int", nullable: false), Fault2 = table.Column(type: "int", nullable: false), Status = table.Column(type: "int", nullable: false), Status1 = table.Column(type: "int", nullable: false), Status2 = table.Column(type: "int", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_RGV523", x => x.ID); table.ForeignKey( name: "FK_WCS_RGV523_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_SC520", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Handshake = table.Column(type: "smallint", nullable: false), Startnumber1 = table.Column(type: "smallint", nullable: false), Endnumber2 = table.Column(type: "smallint", nullable: false), GoodsType = table.Column(type: "smallint", nullable: false), SpeedMode = table.Column(type: "smallint", nullable: false), SLine = table.Column(type: "smallint", nullable: false), SCol = table.Column(type: "smallint", nullable: false), SLayer = table.Column(type: "smallint", nullable: false), SDepth = table.Column(type: "smallint", nullable: false), ELine = table.Column(type: "smallint", nullable: false), ECol = table.Column(type: "smallint", nullable: false), ELayer = table.Column(type: "smallint", nullable: false), EDepth = table.Column(type: "smallint", nullable: false), TaskID = table.Column(type: "int", nullable: false), Trigger = table.Column(type: "smallint", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_SC520", x => x.ID); table.ForeignKey( name: "FK_WCS_SC520_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_SC521", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Handshake = table.Column(type: "bit", nullable: false), GetFinishi = table.Column(type: "bit", nullable: false), PutFinishi = table.Column(type: "bit", nullable: false), Alarm = table.Column(type: "bit", nullable: false), TaskFinishi = table.Column(type: "bit", nullable: false), Loaded = table.Column(type: "bit", nullable: false), ForkCenter = table.Column(type: "bit", nullable: false), RES = table.Column(type: "tinyint", nullable: false), Mode = table.Column(type: "smallint", nullable: false), Status = table.Column(type: "smallint", nullable: false), SLine = table.Column(type: "smallint", nullable: false), SCol = table.Column(type: "smallint", nullable: false), SLayer = table.Column(type: "smallint", nullable: false), SDepth = table.Column(type: "smallint", nullable: false), ELine = table.Column(type: "smallint", nullable: false), ECol = table.Column(type: "smallint", nullable: false), ELayer = table.Column(type: "smallint", nullable: false), EDepth = table.Column(type: "smallint", nullable: false), TaskID = table.Column(type: "int", nullable: false), Trigger = table.Column(type: "smallint", nullable: false), Line = table.Column(type: "smallint", nullable: false), Col = table.Column(type: "smallint", nullable: false), Layer = table.Column(type: "smallint", nullable: false), FinishedTask = table.Column(type: "int", nullable: false), TravelPos = table.Column(type: "int", nullable: false), LiftPos = table.Column(type: "int", nullable: false), ForkPos = table.Column(type: "int", nullable: false), Startnumber1 = table.Column(type: "smallint", nullable: false), Endnumber2 = table.Column(type: "smallint", nullable: false), TotalKM = table.Column(type: "real", nullable: false), GoodsType = table.Column(type: "smallint", nullable: false), Runtime = table.Column(type: "real", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_SC521", x => x.ID); table.ForeignKey( name: "FK_WCS_SC521_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_SC537", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SCAlarm = table.Column(type: "decimal(20,0)", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_SC537", x => x.ID); table.ForeignKey( name: "FK_WCS_SC537_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_STATION520", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), TASKNUM = table.Column(type: "int", nullable: false), GOODSCODE = table.Column(type: "smallint", nullable: false), GOODSTYPE = table.Column(type: "smallint", nullable: false), GOODSSIZE = table.Column(type: "smallint", nullable: false), GOODSSTART = table.Column(type: "smallint", nullable: false), GOODSEND = table.Column(type: "smallint", nullable: false), WEIGHT = table.Column(type: "smallint", nullable: false), FLAGS = table.Column(type: "smallint", nullable: false), CONFIRM = table.Column(type: "smallint", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_STATION520", x => x.ID); table.ForeignKey( name: "FK_WCS_STATION520_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_STATION521", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), TASKNUM = table.Column(type: "int", nullable: false), GOODSCODE = table.Column(type: "smallint", nullable: false), GOODSTYPE = table.Column(type: "smallint", nullable: false), GOODSSIZE = table.Column(type: "smallint", nullable: false), GOODSSTART = table.Column(type: "smallint", nullable: false), GOODSEND = table.Column(type: "smallint", nullable: false), REQUEST = table.Column(type: "bit", nullable: false), RES = table.Column(type: "bit", nullable: false), RES1 = table.Column(type: "bit", nullable: false), RES2 = table.Column(type: "bit", nullable: false), PH_STATUS = table.Column(type: "bit", nullable: false), GOODS_ERR = table.Column(type: "bit", nullable: false), F_OUTSIDE = table.Column(type: "bit", nullable: false), B_OUTSIDE = table.Column(type: "bit", nullable: false), L_OUTSIDE = table.Column(type: "bit", nullable: false), R_OUTSIDE = table.Column(type: "bit", nullable: false), H_OUTSIDE = table.Column(type: "bit", nullable: false), BCR_NOREAD = table.Column(type: "bit", nullable: false), OVERLOAD = table.Column(type: "bit", nullable: false), RES3 = table.Column(type: "bit", nullable: false), RES4 = table.Column(type: "bit", nullable: false), RES5 = table.Column(type: "bit", nullable: false), WEIGHT = table.Column(type: "int", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_STATION521", x => x.ID); table.ForeignKey( name: "FK_WCS_STATION521_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_STATION523", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Fault = table.Column(type: "int", nullable: false), RES = table.Column(type: "int", nullable: false), Status = table.Column(type: "smallint", nullable: false), RunTime = table.Column(type: "real", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: true), FRAME = table.Column(type: "datetime2", nullable: false), ISLAST = table.Column(type: "bit", nullable: false), WCSVERSION = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_WCS_STATION523", x => x.ID); table.ForeignKey( name: "FK_WCS_STATION523_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_DATABLOCK", columns: table => new { CODE = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), NAME = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), PLCCODE = table.Column(type: "nvarchar(20)", nullable: true), NO = table.Column(type: "int", nullable: false), LENGTH = table.Column(type: "int", nullable: false), DATALENGTH = table.Column(type: "int", nullable: false), PROTOCOL = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), NOUPDATE = table.Column(type: "bit", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true) }, constraints: table => { table.PrimaryKey("PK_WCS_DATABLOCK", x => x.CODE); table.ForeignKey( name: "FK_WCS_DATABLOCK_WCS_PLC_PLCCODE", column: x => x.PLCCODE, principalTable: "WCS_PLC", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "WCS_DEVICEPROTOCOL", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DEVICECODE = table.Column(type: "nvarchar(50)", nullable: false), DBCODE = table.Column(type: "nvarchar(20)", nullable: true), POSITION = table.Column(type: "smallint", nullable: false), ENABLED = table.Column(type: "bit", nullable: false), UPDATEUSER = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), UPDATETIME = table.Column(type: "datetime2", nullable: false), VER = table.Column(type: "rowversion", rowVersion: true, nullable: true) }, constraints: table => { table.PrimaryKey("PK_WCS_DEVICEPROTOCOL", x => x.ID); table.ForeignKey( name: "FK_WCS_DEVICEPROTOCOL_WCS_DATABLOCK_DBCODE", column: x => x.DBCODE, principalTable: "WCS_DATABLOCK", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_WCS_DEVICEPROTOCOL_WCS_DEVICE_DEVICECODE", column: x => x.DEVICECODE, principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_WCS_BCR80_DEVICECODE", table: "WCS_BCR80", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_DATABLOCK_PLCCODE", table: "WCS_DATABLOCK", column: "PLCCODE"); migrationBuilder.CreateIndex( name: "IX_WCS_DEVICEPROTOCOL_DBCODE", table: "WCS_DEVICEPROTOCOL", column: "DBCODE"); migrationBuilder.CreateIndex( name: "IX_WCS_DEVICEPROTOCOL_DEVICECODE", table: "WCS_DEVICEPROTOCOL", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_RGV520_DEVICECODE", table: "WCS_RGV520", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_RGV521_DEVICECODE", table: "WCS_RGV521", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_RGV523_DEVICECODE", table: "WCS_RGV523", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_SC520_DEVICECODE", table: "WCS_SC520", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_SC521_DEVICECODE", table: "WCS_SC521", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_SC537_DEVICECODE", table: "WCS_SC537", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_STATION520_DEVICECODE", table: "WCS_STATION520", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_STATION521_DEVICECODE", table: "WCS_STATION521", column: "DEVICECODE"); migrationBuilder.CreateIndex( name: "IX_WCS_STATION523_DEVICECODE", table: "WCS_STATION523", column: "DEVICECODE"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "WCS_BCR80"); migrationBuilder.DropTable( name: "WCS_CMD"); migrationBuilder.DropTable( name: "WCS_DEVICEPROTOCOL"); migrationBuilder.DropTable( name: "WCS_EXCEPTION"); migrationBuilder.DropTable( name: "WCS_RGV520"); migrationBuilder.DropTable( name: "WCS_RGV521"); migrationBuilder.DropTable( name: "WCS_RGV523"); migrationBuilder.DropTable( name: "WCS_SC520"); migrationBuilder.DropTable( name: "WCS_SC521"); migrationBuilder.DropTable( name: "WCS_SC537"); migrationBuilder.DropTable( name: "WCS_STATION520"); migrationBuilder.DropTable( name: "WCS_STATION521"); migrationBuilder.DropTable( name: "WCS_STATION523"); migrationBuilder.DropTable( name: "WCS_DATABLOCK"); migrationBuilder.DropTable( name: "WCS_DEVICE"); migrationBuilder.DropTable( name: "WCS_PLC"); } } }