using System; using Microsoft.EntityFrameworkCore.Migrations; namespace WCS.Service.Migrations { public partial class _92812 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { 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: "int", 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), PH_STATUS2 = table.Column(type: "bit", nullable: false), RES4 = table.Column(type: "bit", nullable: false), RES5 = table.Column(type: "bit", nullable: false), HEIGHT = 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_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.CreateIndex( name: "IX_WCS_STATION521_DEVICECODE", table: "WCS_STATION521", column: "DEVICECODE"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "WCS_STATION521"); } } }