2020-06-28 17:55:27 +09:00
|
|
|
using BTCPayServer.Data;
|
2019-08-30 17:55:24 +09:00
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
2018-04-29 18:28:04 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Migrations
|
|
|
|
{
|
2019-08-30 17:55:24 +09:00
|
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
|
|
[Migration("20180429083930_legacyapikey")]
|
2018-04-29 18:28:04 +09:00
|
|
|
public partial class legacyapikey : Migration
|
|
|
|
{
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
2019-12-23 14:56:21 +09:00
|
|
|
int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null;
|
2018-04-29 18:28:04 +09:00
|
|
|
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");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|