using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace backend.Migrations { /// public partial class AddDeviceOwnerFkAndPinSettingsId : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Id", table: "SystemSettings", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .OldAnnotation("Sqlite:Autoincrement", true); migrationBuilder.AddForeignKey( name: "FK_Devices_AspNetUsers_OwnerUserId", table: "Devices", column: "OwnerUserId", principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Devices_AspNetUsers_OwnerUserId", table: "Devices"); migrationBuilder.AlterColumn( name: "Id", table: "SystemSettings", type: "INTEGER", nullable: false, oldClrType: typeof(int), oldType: "INTEGER") .Annotation("Sqlite:Autoincrement", true); } } }