mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
* feature: Added .stickyroles command, untested
* ci: possible fix
This commit is contained in:
3828
src/NadekoBot/Migrations/Mysql/20240423153724_sticky-roles.Designer.cs
generated
Normal file
3828
src/NadekoBot/Migrations/Mysql/20240423153724_sticky-roles.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations.Mysql
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class stickyroles : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "stickyroles",
|
||||
table: "guildconfigs",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "stickyroles",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
guildid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
roleids = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_stickyroles", x => x.id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_stickyroles_guildid_userid",
|
||||
table: "stickyroles",
|
||||
columns: new[] { "guildid", "userid" },
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "stickyroles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "stickyroles",
|
||||
table: "guildconfigs");
|
||||
}
|
||||
}
|
||||
}
|
@@ -983,6 +983,10 @@ namespace NadekoBot.Db.Migrations.Mysql
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasColumnName("senddmgreetmessage");
|
||||
|
||||
b.Property<bool>("StickyRoles")
|
||||
.HasColumnType("tinyint(1)")
|
||||
.HasColumnName("stickyroles");
|
||||
|
||||
b.Property<string>("TimeZoneId")
|
||||
.HasColumnType("longtext")
|
||||
.HasColumnName("timezoneid");
|
||||
@@ -2124,6 +2128,42 @@ namespace NadekoBot.Db.Migrations.Mysql
|
||||
b.ToTable("slowmodeignoreduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StickyRole", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasColumnName("id");
|
||||
|
||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<ulong>("GuildId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("guildid");
|
||||
|
||||
b.Property<string>("RoleIds")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasColumnName("roleids");
|
||||
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("bigint unsigned")
|
||||
.HasColumnName("userid");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("pk_stickyroles");
|
||||
|
||||
b.HasIndex("GuildId", "UserId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("ix_stickyroles_guildid_userid");
|
||||
|
||||
b.ToTable("stickyroles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamRoleBlacklistedUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
Reference in New Issue
Block a user