12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _7121 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "WCS_ROUTE",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: false),
- NEXTDEVICE = table.Column<string>(type: "nvarchar(10)", maxLength: 10, 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)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WCS_ROUTE", x => x.ID);
- table.ForeignKey(
- name: "FK_WCS_ROUTE_WCS_DEVICE_DEVICECODE",
- column: x => x.DEVICECODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateIndex(
- name: "IX_WCS_ROUTE_DEVICECODE",
- table: "WCS_ROUTE",
- column: "DEVICECODE");
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "WCS_ROUTE");
- }
- }
- }
|