mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
53 lines
1.9 KiB
C#
53 lines
1.9 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)
|
|
{
|
|
int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null;
|
|
migrationBuilder.CreateTable(
|
|
name: "LightningAddresses",
|
|
columns: table => new
|
|
{
|
|
Username = table.Column<string>(nullable: false, maxLength: maxLength),
|
|
StoreDataId = table.Column<string>(nullable: false, maxLength: maxLength),
|
|
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");
|
|
}
|
|
}
|
|
}
|