mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
- Fixed a patron rewards bug caused by monthly donation checking not accounting for year increase - Fixed a patron rewards bug for users who connected the same discord account with multiple patreon accounts
73 lines
2.1 KiB
C#
73 lines
2.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace NadekoBot.Migrations
|
|
{
|
|
public partial class patronfix : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_Patrons",
|
|
table: "Patrons");
|
|
|
|
migrationBuilder.AlterColumn<ulong>(
|
|
name: "UserId",
|
|
table: "Patrons",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
oldClrType: typeof(ulong),
|
|
oldType: "INTEGER")
|
|
.OldAnnotation("Sqlite:Autoincrement", true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Id",
|
|
table: "Patrons",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0)
|
|
.Annotation("Sqlite:Autoincrement", true);
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_Patrons",
|
|
table: "Patrons",
|
|
column: "Id");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Patrons_UserId",
|
|
table: "Patrons",
|
|
column: "UserId");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_Patrons",
|
|
table: "Patrons");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Patrons_UserId",
|
|
table: "Patrons");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Id",
|
|
table: "Patrons");
|
|
|
|
migrationBuilder.AlterColumn<ulong>(
|
|
name: "UserId",
|
|
table: "Patrons",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
oldClrType: typeof(ulong),
|
|
oldType: "INTEGER")
|
|
.Annotation("Sqlite:Autoincrement", true);
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_Patrons",
|
|
table: "Patrons",
|
|
column: "UserId");
|
|
}
|
|
}
|
|
}
|