mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using BTCPayServer.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace BTCPayServer.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20220414132313_AddLightningAddress")]
|
|
public partial class AddLightningAddress : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "LightningAddresses",
|
|
columns: table => new
|
|
{
|
|
Username = table.Column<string>(nullable: false, maxLength: null),
|
|
StoreDataId = table.Column<string>(nullable: false, maxLength: null),
|
|
Blob = table.Column<byte[]>( nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_LightningAddresses", x => x.Username);
|
|
table.ForeignKey(
|
|
name: "FK_LightningAddresses_Stores_StoreDataId",
|
|
column: x => x.StoreDataId,
|
|
principalTable: "Stores",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_LightningAddresses_StoreDataId",
|
|
table: "LightningAddresses",
|
|
column: "StoreDataId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "LightningAddresses");
|
|
}
|
|
}
|
|
}
|