using Microsoft.EntityFrameworkCore.Migrations; namespace WCS.Service.Migrations { public partial class _7124 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE", table: "WCS_PATH"); migrationBuilder.AlterColumn( name: "STARTCODE", table: "WCS_PATH", type: "nvarchar(50)", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "nvarchar(50)", oldNullable: true); migrationBuilder.AddForeignKey( name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE", table: "WCS_PATH", column: "STARTCODE", principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Cascade); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE", table: "WCS_PATH"); migrationBuilder.AlterColumn( name: "STARTCODE", table: "WCS_PATH", type: "nvarchar(50)", nullable: true, oldClrType: typeof(string), oldType: "nvarchar(50)"); migrationBuilder.AddForeignKey( name: "FK_WCS_PATH_WCS_DEVICE_STARTCODE", table: "WCS_PATH", column: "STARTCODE", principalTable: "WCS_DEVICE", principalColumn: "CODE", onDelete: ReferentialAction.Restrict); } } }