mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using BTCPayServer.Data;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace BTCPayServer.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20180429083930_legacyapikey")]
|
|
public partial class legacyapikey : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null;
|
|
migrationBuilder.CreateTable(
|
|
name: "ApiKeys",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<string>(maxLength: 50, nullable: false),
|
|
StoreId = table.Column<string>(maxLength: 50, nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ApiKeys", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_ApiKeys_StoreId",
|
|
table: "ApiKeys",
|
|
column: "StoreId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "ApiKeys");
|
|
}
|
|
}
|
|
}
|