40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
|
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");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|