using System; using BTCPayServer.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BTCPayServer.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20220610090843_AddSettingsToStore")] public partial class AddSettingsToStore : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "StoreSettings", columns: table => new { Name = table.Column(nullable: false, maxLength: null), StoreId = table.Column(nullable: false, maxLength: null), Value = table.Column(type: "JSONB", nullable: true) }, constraints: table => { table.PrimaryKey("PK_StoreSettings", x => new { x.StoreId, x.Name }); table.ForeignKey( name: "FK_StoreSettings_Stores_StoreId", column: x => x.StoreId, principalTable: "Stores", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "StoreSettings"); } } }