using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace InkForge.Sqlite.Migrations { /// public partial class _02_Metadata : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Metadata", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), Value = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Metadata", x => x.Id); }); migrationBuilder.CreateTable( name: "MetadataHistory", columns: table => new { Version = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Value = table.Column(type: "TEXT", nullable: false), Id = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_MetadataHistory", x => x.Version); }); migrationBuilder.CreateIndex( name: "IX_MetadataHistory_Id_Version", table: "MetadataHistory", columns: new[] { "Id", "Version" }, unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Metadata"); migrationBuilder.DropTable( name: "MetadataHistory"); } } }