123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class 双工位RGV : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "WCS_DRGV520",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- TaskID_1 = table.Column<int>(type: "int", nullable: false),
- TaskType_1 = table.Column<short>(type: "smallint", nullable: false),
- StartPosition_1 = table.Column<short>(type: "smallint", nullable: false),
- DestPosition_1 = table.Column<short>(type: "smallint", nullable: false),
- PRIORITY_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),
- Trigger_1 = table.Column<short>(type: "smallint", nullable: false),
- TaskID_2 = table.Column<int>(type: "int", nullable: false),
- TaskType_2 = table.Column<short>(type: "smallint", nullable: false),
- StartPosition_2 = table.Column<short>(type: "smallint", nullable: false),
- DestPosition_2 = table.Column<short>(type: "smallint", nullable: false),
- PRIORITY_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),
- Trigger_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_DRGV520", x => x.ID);
- table.ForeignKey(
- name: "FK_WCS_DRGV520_WCS_DEVICE_DEVICECODE",
- column: x => x.DEVICECODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "WCS_DRGV521",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- TaskID_1 = table.Column<int>(type: "int", nullable: false),
- TaskType_1 = table.Column<short>(type: "smallint", nullable: false),
- StartPosition_1 = table.Column<short>(type: "smallint", nullable: false),
- DestPosition_1 = table.Column<short>(type: "smallint", nullable: false),
- PRIORITY_1 = table.Column<short>(type: "smallint", nullable: false),
- ACT_V_1 = table.Column<short>(type: "smallint", nullable: false),
- RES2_1 = table.Column<short>(type: "smallint", nullable: false),
- PH_Status_1 = table.Column<bool>(type: "bit", nullable: false),
- ToSition_1 = table.Column<bool>(type: "bit", nullable: false),
- Finish_1 = table.Column<bool>(type: "bit", nullable: false),
- TaskID_2 = table.Column<int>(type: "int", nullable: false),
- TaskType_2 = table.Column<short>(type: "smallint", nullable: false),
- StartPosition_2 = table.Column<short>(type: "smallint", nullable: false),
- DestPosition_2 = table.Column<short>(type: "smallint", nullable: false),
- PRIORITY_2 = table.Column<short>(type: "smallint", nullable: false),
- ACT_V_2 = table.Column<short>(type: "smallint", nullable: false),
- RES2_2 = table.Column<short>(type: "smallint", nullable: false),
- PH_Status_2 = table.Column<bool>(type: "bit", nullable: false),
- ToSition_2 = table.Column<bool>(type: "bit", nullable: false),
- Finish_2 = table.Column<bool>(type: "bit", nullable: false),
- SystemStatus = table.Column<short>(type: "smallint", nullable: false),
- WorkMode = table.Column<short>(type: "smallint", nullable: false),
- RES = table.Column<short>(type: "smallint", nullable: false),
- Position = table.Column<float>(type: "real", nullable: false),
- Mileage = table.Column<float>(type: "real", nullable: false),
- Runtime = table.Column<float>(type: "real", 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_DRGV521", x => x.ID);
- table.ForeignKey(
- name: "FK_WCS_DRGV521_WCS_DEVICE_DEVICECODE",
- column: x => x.DEVICECODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "WCS_DRGV523",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Fault = table.Column<int>(type: "int", nullable: false),
- Fault1 = table.Column<int>(type: "int", nullable: false),
- Fault2 = table.Column<int>(type: "int", nullable: false),
- Status = table.Column<int>(type: "int", nullable: false),
- Status1 = table.Column<int>(type: "int", nullable: false),
- Status2 = table.Column<int>(type: "int", nullable: false),
- DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
- 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),
- 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_DRGV523", x => x.ID);
- table.ForeignKey(
- name: "FK_WCS_DRGV523_WCS_DEVICE_DEVICECODE",
- column: x => x.DEVICECODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateIndex(
- name: "IX_WCS_DRGV520_DEVICECODE",
- table: "WCS_DRGV520",
- column: "DEVICECODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_DRGV521_DEVICECODE",
- table: "WCS_DRGV521",
- column: "DEVICECODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_DRGV523_DEVICECODE",
- table: "WCS_DRGV523",
- column: "DEVICECODE");
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "WCS_DRGV520");
- migrationBuilder.DropTable(
- name: "WCS_DRGV521");
- migrationBuilder.DropTable(
- name: "WCS_DRGV523");
- }
- }
- }
|