34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace ChaosBot.Migrations
|
|
{
|
|
public partial class ExperiencePoints : Migration
|
|
{
|
|
private const string Table = "ExperiencePoints";
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: Table,
|
|
columns: table => new
|
|
{
|
|
DiscordGuildId = table.Column<ulong>(nullable: false),
|
|
DiscordUserId = table.Column<ulong>(nullable: false),
|
|
Amount = table.Column<ulong>(nullable: false, defaultValue: 0),
|
|
lastUpdated = table.Column<DateTime>(nullable:false, defaultValue: "0000-00-00 00:00:00")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_UserAndGuild", x => new {x.DiscordUserId, x.DiscordGuildId});
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(Table);
|
|
}
|
|
}
|
|
}
|