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(nullable: false), DiscordUserId = table.Column(nullable: false), Amount = table.Column(nullable: false, defaultValue: 0), lastUpdated = table.Column(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); } } }