mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
cb25c225e9
* Remove custodians * Hide Experimental checkbox in the server policies --------- Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
using System;
|
|
using BTCPayServer.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
#nullable disable
|
|
|
|
namespace BTCPayServer.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20240325095923_RemoveCustodian")]
|
|
public partial class RemoveCustodian : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "CustodianAccount");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "CustodianAccount",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
|
StoreId = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
|
Blob = table.Column<byte[]>(type: "BLOB", nullable: true),
|
|
Blob2 = table.Column<string>(type: "TEXT", nullable: true),
|
|
CustodianCode = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false),
|
|
Name = table.Column<string>(type: "TEXT", maxLength: 50, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_CustodianAccount", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_CustodianAccount_Stores_StoreId",
|
|
column: x => x.StoreId,
|
|
principalTable: "Stores",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_CustodianAccount_StoreId",
|
|
table: "CustodianAccount",
|
|
column: "StoreId");
|
|
}
|
|
}
|
|
}
|