NadekoBot/NadekoBot.Core/Migrations/20170401205753_patreon-rewards.cs

40 lines
1.3 KiB
C#
Raw Permalink Normal View History

2017-04-01 22:01:02 +00:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations
{
public partial class patreonrewards : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "RewardedUsers",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
AmountRewardedThisMonth = table.Column<int>(nullable: false),
DateAdded = table.Column<DateTime>(nullable: true),
LastReward = table.Column<DateTime>(nullable: false),
UserId = table.Column<ulong>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RewardedUsers", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_RewardedUsers_UserId",
table: "RewardedUsers",
column: "UserId",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "RewardedUsers");
}
}
}