mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-10 09:34:30 +01:00
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BTCPayServer.Data.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20250407133937_AddingReferenceIdToPaymentRequest")]
|
|
public partial class AddingReferenceIdToPaymentRequest : Migration
|
|
{
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ReferenceId",
|
|
table: "PaymentRequests",
|
|
type: "TEXT",
|
|
nullable: true);
|
|
migrationBuilder.Sql("""
|
|
CREATE UNIQUE INDEX IX_PaymentRequests_StoreDataId_ReferenceId
|
|
ON "PaymentRequests" ("StoreDataId", "ReferenceId")
|
|
WHERE "ReferenceId" IS NOT NULL;
|
|
""");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ReferenceId",
|
|
table: "PaymentRequests");
|
|
}
|
|
}
|
|
}
|