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( 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( name: "NEXTDEVICE", table: "WCS_ROUTE", type: "nvarchar(10)", maxLength: 10, nullable: false, defaultValue: ""); } } }