mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
- 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
This commit is contained in:
3635
src/NadekoBot/Migrations/Mysql/20230109010035_patron-fix.Designer.cs
generated
Normal file
3635
src/NadekoBot/Migrations/Mysql/20230109010035_patron-fix.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
73
src/NadekoBot/Migrations/Mysql/20230109010035_patron-fix.cs
Normal file
73
src/NadekoBot/Migrations/Mysql/20230109010035_patron-fix.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Migrations.Mysql
|
||||
{
|
||||
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: "bigint unsigned",
|
||||
nullable: false,
|
||||
oldClrType: typeof(ulong),
|
||||
oldType: "bigint unsigned")
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "id",
|
||||
table: "patrons",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
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: "bigint unsigned",
|
||||
nullable: false,
|
||||
oldClrType: typeof(ulong),
|
||||
oldType: "bigint unsigned")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_patrons",
|
||||
table: "patrons",
|
||||
column: "userid");
|
||||
}
|
||||
}
|
||||
}
|
@@ -319,10 +319,10 @@ namespace NadekoBot.Migrations.Mysql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("userid");
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<int>("AmountCents")
|
||||
.HasColumnType("int")
|
||||
@@ -336,17 +336,24 @@ namespace NadekoBot.Migrations.Mysql
|
||||
.HasColumnType("varchar(255)")
|
||||
.HasColumnName("uniqueplatformuserid");
|
||||
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("userid");
|
||||
|
||||
b.Property<DateTime>("ValidThru")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("validthru");
|
||||
|
||||
b.HasKey("UserId")
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_patrons");
|
||||
|
||||
b.HasIndex("UniquePlatformUserId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_patrons_uniqueplatformuserid");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
.HasDatabaseName("ix_patrons_userid");
|
||||
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
|
3785
src/NadekoBot/Migrations/PostgreSql/20230109010058_patron-fix.Designer.cs
generated
Normal file
3785
src/NadekoBot/Migrations/PostgreSql/20230109010058_patron-fix.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,55 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
@@ -331,10 +331,12 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<decimal>("UserId")
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("userid");
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("AmountCents")
|
||||
.HasColumnType("integer")
|
||||
@@ -348,17 +350,24 @@ namespace NadekoBot.Migrations.PostgreSql
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("uniqueplatformuserid");
|
||||
|
||||
b.Property<decimal>("UserId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("userid");
|
||||
|
||||
b.Property<DateTime>("ValidThru")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("validthru");
|
||||
|
||||
b.HasKey("UserId")
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_patrons");
|
||||
|
||||
b.HasIndex("UniquePlatformUserId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_patrons_uniqueplatformuserid");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
.HasDatabaseName("ix_patrons_userid");
|
||||
|
||||
b.ToTable("patrons", (string)null);
|
||||
});
|
||||
|
||||
|
2915
src/NadekoBot/Migrations/Sqlite/20230109005417_patron-fix.Designer.cs
generated
Normal file
2915
src/NadekoBot/Migrations/Sqlite/20230109005417_patron-fix.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
72
src/NadekoBot/Migrations/Sqlite/20230109005417_patron-fix.cs
Normal file
72
src/NadekoBot/Migrations/Sqlite/20230109005417_patron-fix.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
@@ -251,7 +251,7 @@ namespace NadekoBot.Migrations
|
||||
|
||||
modelBuilder.Entity("NadekoBot.Db.Models.PatronUser", b =>
|
||||
{
|
||||
b.Property<ulong>("UserId")
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -264,14 +264,19 @@ namespace NadekoBot.Migrations
|
||||
b.Property<string>("UniquePlatformUserId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("ValidThru")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("UserId");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UniquePlatformUserId")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Patrons");
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user