chaosbot/ChaosBot/Migrations/20200804204404_Raffles.cs

33 lines
1.0 KiB
C#

using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ChaosBot.Migrations
{
public partial class Raffles : Migration
{
private const string Table = "Raffles";
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: Table,
columns: table => new
{
Id = table.Column<ulong>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
DiscordUserId = table.Column<ulong>(nullable: false),
DiscordGuildId = table.Column<ulong>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ID", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(Table);
}
}
}