mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 13:26:47 +01:00
84 lines
2.9 KiB
C#
84 lines
2.9 KiB
C#
// <auto-generated />
|
|
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("20220311135252_AddPayoutProcessors")]
|
|
public partial class AddPayoutProcessors : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "StoreDataId",
|
|
table: "Payouts",
|
|
nullable: true,
|
|
maxLength: null);
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "PayoutProcessors",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(nullable: false, maxLength: null),
|
|
StoreId = table.Column<string>(nullable: true, maxLength: null),
|
|
PaymentMethod = table.Column<string>(nullable: true),
|
|
Processor = table.Column<string>(nullable: true),
|
|
Blob = table.Column<byte[]>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_PayoutProcessors", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_PayoutProcessors_Stores_StoreId",
|
|
column: x => x.StoreId,
|
|
principalTable: "Stores",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Payouts_StoreDataId",
|
|
table: "Payouts",
|
|
column: "StoreDataId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PayoutProcessors_StoreId",
|
|
table: "PayoutProcessors",
|
|
column: "StoreId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Payouts_Stores_StoreDataId",
|
|
table: "Payouts",
|
|
column: "StoreDataId",
|
|
principalTable: "Stores",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Payouts_Stores_StoreDataId",
|
|
table: "Payouts");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "PayoutProcessors");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Payouts_StoreDataId",
|
|
table: "Payouts");
|
|
migrationBuilder.DropColumn(
|
|
name: "StoreDataId",
|
|
table: "Payouts");
|
|
}
|
|
}
|
|
}
|