mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
namespace BTCPayServer.Migrations
|
|||
|
{
|
|||
|
public partial class AddPaymentRequests : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "PaymentRequests",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<string>(nullable: false),
|
|||
|
StoreDataId = table.Column<string>(nullable: true),
|
|||
|
Status = table.Column<int>(nullable: false),
|
|||
|
Blob = table.Column<byte[]>(nullable: true)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_PaymentRequests", x => x.Id);
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_PaymentRequests_Stores_StoreDataId",
|
|||
|
column: x => x.StoreDataId,
|
|||
|
principalTable: "Stores",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_PaymentRequests_Status",
|
|||
|
table: "PaymentRequests",
|
|||
|
column: "Status");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_PaymentRequests_StoreDataId",
|
|||
|
table: "PaymentRequests",
|
|||
|
column: "StoreDataId");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "PaymentRequests");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|