12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _7123 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "WCS_PATH",
- 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),
- PATH = table.Column<string>(type: "nvarchar(max)", 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_PATH", x => x.ID);
- table.ForeignKey(
- name: "FK_WCS_PATH_WCS_DEVICE_ENDCODE",
- column: x => x.ENDCODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE",
- column: x => x.STARTCODE,
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATH_ENDCODE",
- table: "WCS_PATH",
- column: "ENDCODE");
- migrationBuilder.CreateIndex(
- name: "IX_WCS_PATH_STARTCODE",
- table: "WCS_PATH",
- column: "STARTCODE");
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "WCS_PATH");
- }
- }
- }
|