123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _931 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "WCS_PATHPOINT",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- STARTCODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
- ENDCODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
- DEVICECODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
- PREVCODE = table.Column<string>(type: "nvarchar(50)", nullable: true),
- NEXTCODE = 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)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WCS_PATHPOINT", x => x.ID);
- table.ForeignKey(
- name: "FK_WCS_PATHPOINT_WCS_DEVICE_DEVICECODE",
- column: x => x.DEVICECODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_WCS_PATHPOINT_WCS_DEVICE_ENDCODE",
- column: x => x.ENDCODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_WCS_PATHPOINT_WCS_DEVICE_NEXTCODE",
- column: x => x.NEXTCODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_WCS_PATHPOINT_WCS_DEVICE_PREVCODE",
- column: x => x.PREVCODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_WCS_PATHPOINT_WCS_DEVICE_STARTCODE",
- column: x => x.STARTCODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATHPOINT_DEVICECODE",
- table: "WCS_PATHPOINT",
- column: "DEVICECODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATHPOINT_ENDCODE",
- table: "WCS_PATHPOINT",
- column: "ENDCODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATHPOINT_NEXTCODE",
- table: "WCS_PATHPOINT",
- column: "NEXTCODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATHPOINT_PREVCODE",
- table: "WCS_PATHPOINT",
- column: "PREVCODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATHPOINT_STARTCODE",
- table: "WCS_PATHPOINT",
- column: "STARTCODE");
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "WCS_PATHPOINT");
- }
- }
- }
|