2024-04-16 16:18:56 +09:00
|
|
|
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("20240405052858_cleanup_address_invoices")]
|
|
|
|
public partial class cleanup_address_invoices : Migration
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
2024-05-07 09:21:49 +09:00
|
|
|
migrationBuilder.Sql(@"
|
2024-04-16 16:18:56 +09:00
|
|
|
DELETE FROM ""AddressInvoices"" WHERE ""Address"" LIKE '%_LightningLike';
|
|
|
|
ALTER TABLE ""AddressInvoices"" DROP COLUMN IF EXISTS ""CreatedTime"";
|
2024-05-10 22:13:08 +09:00
|
|
|
");
|
|
|
|
migrationBuilder.Sql(@"VACUUM (FULL, ANALYZE) ""AddressInvoices"";", true);
|
2024-04-16 16:18:56 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|