using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DodoSSH.Client.Storage.Migrations { /// /// Adds this device's Spelunk sign-ins, and drops what is left of Spelunk keys (entity type 14), which /// they replaced: their cached items, their outbox entries and their conflicts. /// public partial class AddSpelunkSignIns : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql("DELETE FROM item WHERE entity_type = 14;"); migrationBuilder.Sql("DELETE FROM outbox WHERE entity_type = 14;"); migrationBuilder.Sql("DELETE FROM conflict WHERE entity_type = 14;"); migrationBuilder.CreateTable( name: "spelunk_sign_in", columns: table => new { id = table.Column(type: "TEXT", nullable: false), @sealed = table.Column(name: "sealed", type: "BLOB", nullable: false), updated_at_utc = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("pk_spelunk_sign_in", x => x.id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "spelunk_sign_in"); } } }