mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Merge branch 'v5' of https://gitlab.com/kwoth/nadekobot into v5
This commit is contained in:
@@ -238,10 +238,11 @@ public abstract class NadekoContext : DbContext
|
||||
.HasForeignKey<ClubInfo>(x => x.OwnerId)
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
ci.HasAlternateKey(x => new
|
||||
{
|
||||
x.Name
|
||||
});
|
||||
ci.HasIndex(x => new
|
||||
{
|
||||
x.Name
|
||||
})
|
||||
.IsUnique();
|
||||
|
||||
#endregion
|
||||
|
||||
|
3633
src/NadekoBot/Migrations/Mysql/20230813113816_timely-reminder-type.Designer.cs
generated
Normal file
3633
src/NadekoBot/Migrations/Mysql/20230813113816_timely-reminder-type.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations.Mysql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class timelyremindertype : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "type",
|
||||
table: "reminders",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "type",
|
||||
table: "reminders");
|
||||
}
|
||||
}
|
||||
}
|
3633
src/NadekoBot/Migrations/Mysql/20230903153202_clubinfo-name-index.Designer.cs
generated
Normal file
3633
src/NadekoBot/Migrations/Mysql/20230903153202_clubinfo-name-index.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations.Mysql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class clubinfonameindex : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "ak_clubs_name",
|
||||
table: "clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "name",
|
||||
table: "clubs",
|
||||
type: "varchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
collation: "utf8mb4_bin",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(20)",
|
||||
oldMaxLength: 20,
|
||||
oldCollation: "utf8mb4_bin")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_clubs_name",
|
||||
table: "clubs",
|
||||
column: "name",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_clubs_name",
|
||||
table: "clubs");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "clubs",
|
||||
keyColumn: "name",
|
||||
keyValue: null,
|
||||
column: "name",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "name",
|
||||
table: "clubs",
|
||||
type: "varchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
collation: "utf8mb4_bin",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(20)",
|
||||
oldMaxLength: 20,
|
||||
oldNullable: true,
|
||||
oldCollation: "utf8mb4_bin")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "ak_clubs_name",
|
||||
table: "clubs",
|
||||
column: "name");
|
||||
}
|
||||
}
|
||||
}
|
@@ -135,7 +135,6 @@ namespace NadekoBot.Db.Migrations.Mysql
|
||||
.HasColumnName("imageurl");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("varchar(20)")
|
||||
.HasColumnName("name")
|
||||
@@ -152,8 +151,9 @@ namespace NadekoBot.Db.Migrations.Mysql
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_clubs");
|
||||
|
||||
b.HasAlternateKey("Name")
|
||||
.HasName("ak_clubs_name");
|
||||
b.HasIndex("Name")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_clubs_name");
|
||||
|
||||
b.HasIndex("OwnerId")
|
||||
.IsUnique()
|
||||
@@ -2112,6 +2112,10 @@ namespace NadekoBot.Db.Migrations.Mysql
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("serverid");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("type");
|
||||
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("userid");
|
||||
|
3781
src/NadekoBot/Migrations/Postgresql/20230813113832_timely-reminder-type.Designer.cs
generated
Normal file
3781
src/NadekoBot/Migrations/Postgresql/20230813113832_timely-reminder-type.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class timelyremindertype : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "type",
|
||||
table: "reminders",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "type",
|
||||
table: "reminders");
|
||||
}
|
||||
}
|
||||
}
|
3781
src/NadekoBot/Migrations/Postgresql/20230903154851_clubinfo-name-index.Designer.cs
generated
Normal file
3781
src/NadekoBot/Migrations/Postgresql/20230903154851_clubinfo-name-index.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,59 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class clubinfonameindex : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "ak_clubs_name",
|
||||
table: "clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "name",
|
||||
table: "clubs",
|
||||
type: "character varying(20)",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(20)",
|
||||
oldMaxLength: 20);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_clubs_name",
|
||||
table: "clubs",
|
||||
column: "name",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_clubs_name",
|
||||
table: "clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "name",
|
||||
table: "clubs",
|
||||
type: "character varying(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(20)",
|
||||
oldMaxLength: 20,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "ak_clubs_name",
|
||||
table: "clubs",
|
||||
column: "name");
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,7 +17,7 @@ namespace NadekoBot.Db.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.7")
|
||||
.HasAnnotation("ProductVersion", "7.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
@@ -144,7 +144,6 @@ namespace NadekoBot.Db.Migrations
|
||||
.HasColumnName("imageurl");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("character varying(20)")
|
||||
.HasColumnName("name");
|
||||
@@ -160,8 +159,9 @@ namespace NadekoBot.Db.Migrations
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_clubs");
|
||||
|
||||
b.HasAlternateKey("Name")
|
||||
.HasName("ak_clubs_name");
|
||||
b.HasIndex("Name")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_clubs_name");
|
||||
|
||||
b.HasIndex("OwnerId")
|
||||
.IsUnique()
|
||||
@@ -2212,6 +2212,10 @@ namespace NadekoBot.Db.Migrations
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("serverid");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("type");
|
||||
|
||||
b.Property<decimal>("UserId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("userid");
|
||||
|
2914
src/NadekoBot/Migrations/Sqlite/20230813110732_timely-reminder-type.Designer.cs
generated
Normal file
2914
src/NadekoBot/Migrations/Sqlite/20230813110732_timely-reminder-type.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class timelyremindertype : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Type",
|
||||
table: "Reminders",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Type",
|
||||
table: "Reminders");
|
||||
}
|
||||
}
|
||||
}
|
2914
src/NadekoBot/Migrations/Sqlite/20230903153230_clubinfo-name-index.Designer.cs
generated
Normal file
2914
src/NadekoBot/Migrations/Sqlite/20230903153230_clubinfo-name-index.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,59 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class clubinfonameindex : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "AK_Clubs_Name",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Clubs",
|
||||
type: "TEXT",
|
||||
maxLength: 20,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 20);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Clubs_Name",
|
||||
table: "Clubs",
|
||||
column: "Name",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Clubs_Name",
|
||||
table: "Clubs");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Name",
|
||||
table: "Clubs",
|
||||
type: "TEXT",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldMaxLength: 20,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "AK_Clubs_Name",
|
||||
table: "Clubs",
|
||||
column: "Name");
|
||||
}
|
||||
}
|
||||
}
|
@@ -109,7 +109,6 @@ namespace NadekoBot.Db.Migrations.Sqlite
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
@@ -121,7 +120,8 @@ namespace NadekoBot.Db.Migrations.Sqlite
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAlternateKey("Name");
|
||||
b.HasIndex("Name")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("OwnerId")
|
||||
.IsUnique();
|
||||
@@ -1648,6 +1648,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
|
||||
b.Property<ulong>("ServerId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
@@ -2364,3 +2364,7 @@ doas:
|
||||
desc: "Execute the command as if you were the target user. Requires bot ownership and server administrator permission."
|
||||
args:
|
||||
- "@Thief .give all @Admin"
|
||||
clubrename:
|
||||
desc: "Renames your club. Requires you club ownership or club-admin status."
|
||||
args:
|
||||
- "New cool club name"
|
@@ -841,7 +841,6 @@
|
||||
"club_insuff_lvl": "You're insufficient level to join that club.",
|
||||
"club_join_banned": "You're banned from that club.",
|
||||
"club_already_in": "You are already a member of a club.",
|
||||
"club_create_error_name": "Failed creating the club. A club with that name already exists.",
|
||||
"club_name_too_long": "Club name is too long.",
|
||||
"club_created": "Club {0} successfully created!",
|
||||
"club_create_insuff_lvl": "You don't meet the minimum level requirements in order to create a club.",
|
||||
@@ -875,6 +874,8 @@
|
||||
"club_apps_for": "Applicants for {0} club",
|
||||
"club_leaderboard": "Club leaderboard - page {0}",
|
||||
"club_kick_hierarchy": "Only club owner can kick club admins. Owner can't be kicked.",
|
||||
"club_renamed": "Club has been renamed to {0}",
|
||||
"club_name_taken": "A club with that name already exists.",
|
||||
"template_reloaded": "Xp template has been reloaded.",
|
||||
"expr_edited": "Expression Edited",
|
||||
"self_assign_are_exclusive": "You can only choose 1 role from each group.",
|
||||
|
Reference in New Issue
Block a user