Files
nadekobot/src/NadekoBot/Migrations/PostgreSql/20230109010058_patron-fix.cs
Kwoth 9b9fa2f357 - Fixed some potential causes for ratelimit due to default message retry settings
- 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
2023-01-09 02:05:33 +01:00

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");
}
}
}