chaosbot/ChaosBot/Migrations/20200804195804_LodestoneCharacter.cs

33 lines
1.1 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
namespace ChaosBot.Migrations
{
public partial class LodestoneCharacter : Migration
{
private const string Table = "LodestoneCharacter";
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: Table,
columns: table => new
{
LodestoneId = table.Column<ulong>(nullable: false),
DiscordUserId = table.Column<ulong>(nullable: false),
DiscordGuildId = table.Column<ulong>(nullable: false),
Name = table.Column<string>(nullable: false),
Avatar = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CharacterAndGuild", x => new {x.DiscordGuildId, x.LodestoneId});
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(Table);
}
}
}