53 lines
1.8 KiB
C#
53 lines
1.8 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace Telegram.Bot.SpaceApi.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class BEF4B2308E1D40FFAB34130BB0E7E87B : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Bots",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
|||
|
.Annotation("Sqlite:Autoincrement", true),
|
|||
|
Name = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
Token = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
ApiUrl = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
ApiOverrideAddress = table.Column<string>(type: "TEXT", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Bots", x => x.Id);
|
|||
|
});
|
|||
|
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Config",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Key = table.Column<string>(type: "TEXT", nullable: false),
|
|||
|
Value = table.Column<string>(type: "TEXT", nullable: false)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Config", x => x.Key);
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Bots");
|
|||
|
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Config");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|