1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace WCS.Service.Migrations
- {
- public partial class _7122 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "NEXTDEVICE",
- table: "WCS_ROUTE");
- migrationBuilder.AddColumn<string>(
- name: "NEXTCODE",
- table: "WCS_ROUTE",
- type: "nvarchar(50)",
- nullable: true);
- migrationBuilder.CreateIndex(
- name: "IX_WCS_ROUTE_NEXTCODE",
- table: "WCS_ROUTE",
- column: "NEXTCODE");
- migrationBuilder.AddForeignKey(
- name: "FK_WCS_ROUTE_WCS_DEVICE_NEXTCODE",
- table: "WCS_ROUTE",
- column: "NEXTCODE",
- principalTable: "WCS_DEVICE",
- principalColumn: "CODE",
- onDelete: ReferentialAction.Restrict);
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_WCS_ROUTE_WCS_DEVICE_NEXTCODE",
- table: "WCS_ROUTE");
- migrationBuilder.DropIndex(
- name: "IX_WCS_ROUTE_NEXTCODE",
- table: "WCS_ROUTE");
- migrationBuilder.DropColumn(
- name: "NEXTCODE",
- table: "WCS_ROUTE");
- migrationBuilder.AddColumn<string>(
- name: "NEXTDEVICE",
- table: "WCS_ROUTE",
- type: "nvarchar(10)",
- maxLength: 10,
- nullable: false,
- defaultValue: "");
- }
- }
- }
|