mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-24 14:50:50 +01:00
70 lines
2 KiB
C#
70 lines
2 KiB
C#
|
using System;
|
||
|
using BTCPayServer.Data;
|
||
|
using Microsoft.EntityFrameworkCore;
|
||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
||
|
#nullable disable
|
||
|
|
||
|
namespace BTCPayServer.Migrations
|
||
|
{
|
||
|
[DbContext(typeof(ApplicationDbContext))]
|
||
|
[Migration("20240317024757_payments_refactor")]
|
||
|
public partial class payments_refactor : Migration
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.AddColumn<decimal>(
|
||
|
name: "Amount",
|
||
|
table: "Payments",
|
||
|
type: migrationBuilder.IsNpgsql() ? "NUMERIC" : "TEXT",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
||
|
name: "Created",
|
||
|
table: "Payments",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "Currency",
|
||
|
table: "Payments",
|
||
|
type: "TEXT",
|
||
|
nullable: true);
|
||
|
|
||
|
migrationBuilder.AddColumn<string>(
|
||
|
name: "Status",
|
||
|
table: "Payments",
|
||
|
type: "TEXT",
|
||
|
nullable: true);
|
||
|
if (migrationBuilder.IsNpgsql())
|
||
|
{
|
||
|
migrationBuilder.AlterColumn<bool?>(
|
||
|
name: "Accounted",
|
||
|
table: "Payments",
|
||
|
nullable: true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <inheritdoc />
|
||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Amount",
|
||
|
table: "Payments");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Created",
|
||
|
table: "Payments");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Currency",
|
||
|
table: "Payments");
|
||
|
|
||
|
migrationBuilder.DropColumn(
|
||
|
name: "Status",
|
||
|
table: "Payments");
|
||
|
}
|
||
|
}
|
||
|
}
|