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
56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace NadekoBot.Migrations.PostgreSql
|
|
{
|
|
public partial class patronfix : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "pk_patrons",
|
|
table: "patrons");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "id",
|
|
table: "patrons",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
|
|
|
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.AddPrimaryKey(
|
|
name: "pk_patrons",
|
|
table: "patrons",
|
|
column: "userid");
|
|
}
|
|
}
|
|
}
|