using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CartriX.Api.Migrations { /// public partial class Init2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Printers_Locations_locationId", table: "Printers"); migrationBuilder.AlterColumn( name: "locationId", table: "Printers", type: "INTEGER", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "INTEGER", oldNullable: true); migrationBuilder.AddForeignKey( name: "FK_Printers_Locations_locationId", table: "Printers", column: "locationId", principalTable: "Locations", principalColumn: "id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Printers_Locations_locationId", table: "Printers"); migrationBuilder.AlterColumn( name: "locationId", table: "Printers", type: "INTEGER", nullable: true, oldClrType: typeof(int), oldType: "INTEGER"); migrationBuilder.AddForeignKey( name: "FK_Printers_Locations_locationId", table: "Printers", column: "locationId", principalTable: "Locations", principalColumn: "id"); } } }