btcpayserver/BTCPayServer.Data/Migrations/20200507092343_AddArchivedToInvoice.cs
2020-06-28 21:44:35 -05:00

39 lines
1.2 KiB
C#

using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20200507092343_AddArchivedToInvoice")]
public class AddArchivedToInvoice : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Archived",
table: "Invoices",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Archived",
table: "PaymentRequests",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
if (this.SupportDropColumn(migrationBuilder.ActiveProvider))
{
migrationBuilder.DropColumn(
name: "Archived",
table: "Invoices");
migrationBuilder.DropColumn(
name: "Archived",
table: "PaymentRequests");
}
}
}
}