using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CartriX.Api.Migrations { /// public partial class Init3 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Printers_PrinterTypes_typeid", table: "Printers"); migrationBuilder.DropPrimaryKey( name: "PK_PrinterTypes", table: "PrinterTypes"); migrationBuilder.RenameTable( name: "PrinterTypes", newName: "PrintTypes"); migrationBuilder.RenameColumn( name: "typeid", table: "Printers", newName: "printTypeid"); migrationBuilder.RenameIndex( name: "IX_Printers_typeid", table: "Printers", newName: "IX_Printers_printTypeid"); migrationBuilder.AddPrimaryKey( name: "PK_PrintTypes", table: "PrintTypes", column: "id"); migrationBuilder.AddForeignKey( name: "FK_Printers_PrintTypes_printTypeid", table: "Printers", column: "printTypeid", principalTable: "PrintTypes", principalColumn: "id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Printers_PrintTypes_printTypeid", table: "Printers"); migrationBuilder.DropPrimaryKey( name: "PK_PrintTypes", table: "PrintTypes"); migrationBuilder.RenameTable( name: "PrintTypes", newName: "PrinterTypes"); migrationBuilder.RenameColumn( name: "printTypeid", table: "Printers", newName: "typeid"); migrationBuilder.RenameIndex( name: "IX_Printers_printTypeid", table: "Printers", newName: "IX_Printers_typeid"); migrationBuilder.AddPrimaryKey( name: "PK_PrinterTypes", table: "PrinterTypes", column: "id"); migrationBuilder.AddForeignKey( name: "FK_Printers_PrinterTypes_typeid", table: "Printers", column: "typeid", principalTable: "PrinterTypes", principalColumn: "id", onDelete: ReferentialAction.Cascade); } } }