mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 13:26:47 +01:00
d5d0be5824
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
51 lines
1.9 KiB
C#
51 lines
1.9 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;
|
|
|
|
namespace BTCPayServer.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20220115184620_AddCustodianAccountData")]
|
|
public partial class AddCustodianAccountData : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "CustodianAccount",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(maxLength: 50, nullable: false),
|
|
StoreId = table.Column<string>(maxLength: 50, nullable: false),
|
|
CustodianCode = table.Column<string>(maxLength: 50, nullable: false),
|
|
Name = table.Column<string>(maxLength: 50, nullable: true),
|
|
Blob = table.Column<byte[]>(nullable: true)
|
|
},
|
|
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");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "CustodianAccount");
|
|
}
|
|
}
|
|
}
|