using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CartriX.Api.Migrations { /// public partial class Init2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "typeid", table: "Printers", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.CreateIndex( name: "IX_Printers_typeid", table: "Printers", column: "typeid"); migrationBuilder.AddForeignKey( name: "FK_Printers_PrinterTypes_typeid", table: "Printers", column: "typeid", principalTable: "PrinterTypes", principalColumn: "id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Printers_PrinterTypes_typeid", table: "Printers"); migrationBuilder.DropIndex( name: "IX_Printers_typeid", table: "Printers"); migrationBuilder.DropColumn( name: "typeid", table: "Printers"); } } }