2020-06-28 21:44:35 -05:00
|
|
|
using System;
|
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;
|
2017-10-11 12:20:44 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Migrations
|
|
|
|
{
|
2019-08-30 17:55:24 +09:00
|
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
|
|
[Migration("20171010082424_Tokens")]
|
2017-10-11 12:20:44 +09:00
|
|
|
public partial class Tokens : Migration
|
|
|
|
{
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
2019-12-23 14:56:21 +09:00
|
|
|
int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null;
|
2017-10-11 12:20:44 +09:00
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
name: "PairedSINData",
|
|
|
|
columns: table => new
|
|
|
|
{
|
2019-12-23 14:56:21 +09:00
|
|
|
Id = table.Column<string>(nullable: false, maxLength: maxLength),
|
2018-05-10 11:56:46 +09:00
|
|
|
Facade = table.Column<string>(nullable: true),
|
|
|
|
Label = table.Column<string>(nullable: true),
|
|
|
|
Name = table.Column<string>(nullable: true),
|
2017-10-11 12:20:44 +09:00
|
|
|
PairingTime = table.Column<DateTimeOffset>(nullable: false),
|
2020-04-19 11:15:06 +02:00
|
|
|
SIN = table.Column<string>(nullable: true, maxLength: maxLength),
|
2019-12-23 14:56:21 +09:00
|
|
|
StoreDataId = table.Column<string>(nullable: true, maxLength: maxLength)
|
2017-10-11 12:20:44 +09:00
|
|
|
},
|
|
|
|
constraints: table =>
|
|
|
|
{
|
|
|
|
table.PrimaryKey("PK_PairedSINData", x => x.Id);
|
|
|
|
});
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
name: "PairingCodes",
|
|
|
|
columns: table => new
|
|
|
|
{
|
2019-12-23 14:56:21 +09:00
|
|
|
Id = table.Column<string>(nullable: false, maxLength: maxLength),
|
2017-10-11 12:20:44 +09:00
|
|
|
DateCreated = table.Column<DateTime>(nullable: false),
|
|
|
|
Expiration = table.Column<DateTimeOffset>(nullable: false),
|
2018-05-10 11:56:46 +09:00
|
|
|
Facade = table.Column<string>(nullable: true),
|
|
|
|
Label = table.Column<string>(nullable: true),
|
|
|
|
Name = table.Column<string>(nullable: true),
|
|
|
|
SIN = table.Column<string>(nullable: true),
|
2019-12-23 14:56:21 +09:00
|
|
|
StoreDataId = table.Column<string>(nullable: true, maxLength: maxLength),
|
2018-05-10 11:56:46 +09:00
|
|
|
TokenValue = table.Column<string>(nullable: true)
|
2017-10-11 12:20:44 +09:00
|
|
|
},
|
|
|
|
constraints: table =>
|
|
|
|
{
|
|
|
|
table.PrimaryKey("PK_PairingCodes", x => x.Id);
|
|
|
|
});
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
name: "IX_PairedSINData_SIN",
|
|
|
|
table: "PairedSINData",
|
|
|
|
column: "SIN");
|
|
|
|
|
|
|
|
migrationBuilder.CreateIndex(
|
|
|
|
name: "IX_PairedSINData_StoreDataId",
|
|
|
|
table: "PairedSINData",
|
|
|
|
column: "StoreDataId");
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "PairedSINData");
|
|
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
name: "PairingCodes");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|