chaosbot/ChaosBot/Migrations/20200804203214_Points.cs

31 lines
978 B
C#

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