mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
46 lines
1.6 KiB
C#
46 lines
1.6 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace BTCPayServer.Migrations
|
|||
|
{
|
|||
|
public partial class appdata : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Apps",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<string>(nullable: false),
|
|||
|
AppType = table.Column<string>(nullable: true),
|
|||
|
Created = table.Column<DateTimeOffset>(nullable: false),
|
|||
|
Name = table.Column<string>(nullable: true),
|
|||
|
Settings = table.Column<string>(nullable: true),
|
|||
|
StoreDataId = table.Column<string>(nullable: true)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Apps", x => x.Id);
|
|||
|
table.ForeignKey(
|
|||
|
name: "FK_Apps_Stores_StoreDataId",
|
|||
|
column: x => x.StoreDataId,
|
|||
|
principalTable: "Stores",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Restrict);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_Apps_StoreDataId",
|
|||
|
table: "Apps",
|
|||
|
column: "StoreDataId");
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Apps");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|