mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-11 17:57:49 +01:00
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using BTCPayServer.Data;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BTCPayServer.Migrations
|
|
{
|
|
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20240923065254_refactorpayments")]
|
|
public partial class refactorpayments : DBScriptsMigration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_Payments",
|
|
table: "Payments");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "Type",
|
|
table: "Payments",
|
|
newName: "PaymentMethodId");
|
|
migrationBuilder.Sql("UPDATE \"Payments\" SET \"PaymentMethodId\"='' WHERE \"PaymentMethodId\" IS NULL;");
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_Payments",
|
|
table: "Payments",
|
|
columns: new[] { "Id", "PaymentMethodId" });
|
|
base.Up(migrationBuilder);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
}
|
|
}
|
|
}
|