chaosbot/ChaosBot/Migrations/20200804205955_Configuration.cs

31 lines
979 B
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace ChaosBot.Migrations
{
public partial class Configuration : Migration
{
private const string Table = "Configuration";
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: Table,
columns: table => new
{
DiscordGuildId = table.Column<ulong>(nullable: false),
Key = table.Column<string>(nullable: false, maxLength: 128),
SerializedValue = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_KeyOnGuild", x => new {x.DiscordGuildId, x.Key});
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(Table);
}
}
}