| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 | 
							- using System;
 
- using Microsoft.EntityFrameworkCore.Migrations;
 
- #nullable disable
 
- namespace WCS.Service.Migrations
 
- {
 
-     public partial class _8 : Migration
 
-     {
 
-         protected override void Up(MigrationBuilder migrationBuilder)
 
-         {
 
-             migrationBuilder.RenameColumn(
 
-                 name: "SCSTATION",
 
-                 table: "WCS_TASK",
 
-                 newName: "SRMSTATION");
 
-             migrationBuilder.CreateTable(
 
-                 name: "WCS_SRM520",
 
-                 columns: table => new
 
-                 {
 
-                     ID = table.Column<int>(type: "int", nullable: false)
 
-                         .Annotation("SqlServer:Identity", "1, 1"),
 
-                     Handshake_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES1_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES2_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     GoodsType_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SpeedMode_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLine_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SCol_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLayer_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SDepth_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELine_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ECol_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELayer_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     EDepth_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     TaskID_1 = table.Column<int>(type: "int", nullable: false),
 
-                     VoucherNo_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     FinishedACK_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES3_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES4_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Handshake_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES1_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES2_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     GoodsType_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SCSpeedMode_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLine_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SCol_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLayer_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SDepth_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELine_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ECol_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELayer_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     EDepth_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     TaskID_2 = table.Column<int>(type: "int", nullable: false),
 
-                     VoucherNo_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     FinishedACK_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES3_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES4_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ENABLED = table.Column<bool>(type: "bit", nullable: false),
 
-                     UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
 
-                     UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
 
-                     VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
 
-                     DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
 
-                     FRAME = table.Column<DateTime>(type: "datetime2", nullable: false),
 
-                     ISLAST = table.Column<bool>(type: "bit", nullable: false),
 
-                     WCSVERSION = table.Column<int>(type: "int", nullable: false)
 
-                 },
 
-                 constraints: table =>
 
-                 {
 
-                     table.PrimaryKey("PK_WCS_SRM520", x => x.ID);
 
-                     table.ForeignKey(
 
-                         name: "FK_WCS_SRM520_WCS_DEVICE_DEVICECODE",
 
-                         column: x => x.DEVICECODE,
 
-                         principalTable: "WCS_DEVICE",
 
-                         principalColumn: "CODE");
 
-                 });
 
-             migrationBuilder.CreateTable(
 
-                 name: "WCS_SRM521",
 
-                 columns: table => new
 
-                 {
 
-                     ID = table.Column<int>(type: "int", nullable: false)
 
-                         .Annotation("SqlServer:Identity", "1, 1"),
 
-                     ForkStatus_1 = table.Column<long>(type: "bigint", nullable: false),
 
-                     Mode_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Status_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLine_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SCol_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLayer_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SDepth_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELine_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ECol_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELayer_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     EDepth_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     TaskID_1 = table.Column<int>(type: "int", nullable: false),
 
-                     VoucherNo_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Line_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Col_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Layer_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     FinishedTask_1 = table.Column<int>(type: "int", nullable: false),
 
-                     TravelPos_1 = table.Column<int>(type: "int", nullable: false),
 
-                     LiftPos_1 = table.Column<int>(type: "int", nullable: false),
 
-                     ForkPos_1 = table.Column<int>(type: "int", nullable: false),
 
-                     RES9_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES10_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     TotalKM_1 = table.Column<float>(type: "real", nullable: false),
 
-                     GoodsType_1 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Runtime_1 = table.Column<float>(type: "real", nullable: false),
 
-                     RES11_1 = table.Column<int>(type: "int", nullable: false),
 
-                     RES12_1 = table.Column<int>(type: "int", nullable: false),
 
-                     RES13_1 = table.Column<int>(type: "int", nullable: false),
 
-                     RES14_1 = table.Column<int>(type: "int", nullable: false),
 
-                     ForkStatus_2 = table.Column<long>(type: "bigint", nullable: false),
 
-                     Mode_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Status_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLine_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SCol_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SLayer_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     SDepth_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELine_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ECol_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     ELayer_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     EDepth_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     TaskID_2 = table.Column<int>(type: "int", nullable: false),
 
-                     VoucherNo_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Line_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Col_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Layer_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     FinishedTask_2 = table.Column<int>(type: "int", nullable: false),
 
-                     TravelPos_2 = table.Column<int>(type: "int", nullable: false),
 
-                     LiftPos_2 = table.Column<int>(type: "int", nullable: false),
 
-                     ForkPos_2 = table.Column<int>(type: "int", nullable: false),
 
-                     RES9_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     RES10_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     TotalKM_2 = table.Column<float>(type: "real", nullable: false),
 
-                     GoodsType_2 = table.Column<short>(type: "smallint", nullable: false),
 
-                     Runtime_2 = table.Column<float>(type: "real", nullable: false),
 
-                     RES11_2 = table.Column<int>(type: "int", nullable: false),
 
-                     RES12_2 = table.Column<int>(type: "int", nullable: false),
 
-                     RES13_2 = table.Column<int>(type: "int", nullable: false),
 
-                     RES14_2 = table.Column<int>(type: "int", nullable: false),
 
-                     SRMMode = table.Column<short>(type: "smallint", nullable: false),
 
-                     SRMStatus = table.Column<short>(type: "smallint", nullable: false),
 
-                     TotalKM = table.Column<float>(type: "real", nullable: false),
 
-                     Runtime = table.Column<float>(type: "real", nullable: false),
 
-                     Alarm = table.Column<short>(type: "smallint", nullable: false),
 
-                     ENABLED = table.Column<bool>(type: "bit", nullable: false),
 
-                     UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
 
-                     UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
 
-                     VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
 
-                     DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
 
-                     FRAME = table.Column<DateTime>(type: "datetime2", nullable: false),
 
-                     ISLAST = table.Column<bool>(type: "bit", nullable: false),
 
-                     WCSVERSION = table.Column<int>(type: "int", nullable: false)
 
-                 },
 
-                 constraints: table =>
 
-                 {
 
-                     table.PrimaryKey("PK_WCS_SRM521", x => x.ID);
 
-                     table.ForeignKey(
 
-                         name: "FK_WCS_SRM521_WCS_DEVICE_DEVICECODE",
 
-                         column: x => x.DEVICECODE,
 
-                         principalTable: "WCS_DEVICE",
 
-                         principalColumn: "CODE");
 
-                 });
 
-             migrationBuilder.CreateTable(
 
-                 name: "WCS_SRM537",
 
-                 columns: table => new
 
-                 {
 
-                     ID = table.Column<int>(type: "int", nullable: false)
 
-                         .Annotation("SqlServer:Identity", "1, 1"),
 
-                     SCAlarm = table.Column<decimal>(type: "decimal(20,0)", nullable: false),
 
-                     ENABLED = table.Column<bool>(type: "bit", nullable: false),
 
-                     UPDATEUSER = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
 
-                     UPDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
 
-                     VER = table.Column<byte[]>(type: "rowversion", rowVersion: true, nullable: true),
 
-                     DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
 
-                     FRAME = table.Column<DateTime>(type: "datetime2", nullable: false),
 
-                     ISLAST = table.Column<bool>(type: "bit", nullable: false),
 
-                     WCSVERSION = table.Column<int>(type: "int", nullable: false)
 
-                 },
 
-                 constraints: table =>
 
-                 {
 
-                     table.PrimaryKey("PK_WCS_SRM537", x => x.ID);
 
-                     table.ForeignKey(
 
-                         name: "FK_WCS_SRM537_WCS_DEVICE_DEVICECODE",
 
-                         column: x => x.DEVICECODE,
 
-                         principalTable: "WCS_DEVICE",
 
-                         principalColumn: "CODE");
 
-                 });
 
-             migrationBuilder.CreateIndex(
 
-                 name: "IX_WCS_SRM520_DEVICECODE",
 
-                 table: "WCS_SRM520",
 
-                 column: "DEVICECODE");
 
-             migrationBuilder.CreateIndex(
 
-                 name: "IX_WCS_SRM521_DEVICECODE",
 
-                 table: "WCS_SRM521",
 
-                 column: "DEVICECODE");
 
-             migrationBuilder.CreateIndex(
 
-                 name: "IX_WCS_SRM537_DEVICECODE",
 
-                 table: "WCS_SRM537",
 
-                 column: "DEVICECODE");
 
-         }
 
-         protected override void Down(MigrationBuilder migrationBuilder)
 
-         {
 
-             migrationBuilder.DropTable(
 
-                 name: "WCS_SRM520");
 
-             migrationBuilder.DropTable(
 
-                 name: "WCS_SRM521");
 
-             migrationBuilder.DropTable(
 
-                 name: "WCS_SRM537");
 
-             migrationBuilder.RenameColumn(
 
-                 name: "SRMSTATION",
 
-                 table: "WCS_TASK",
 
-                 newName: "SCSTATION");
 
-         }
 
-     }
 
- }
 
 
  |