mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48: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")
|
||||
|
3825
src/NadekoBot/Migrations/Postgresql/20240423153717_sticky-roles.Designer.cs
generated
Normal file
3825
src/NadekoBot/Migrations/Postgresql/20240423153717_sticky-roles.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class stickyroles : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "stickyroles",
|
||||
table: "guildconfigs",
|
||||
type: "boolean",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "stickyroles",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
roleids = table.Column<string>(type: "text", nullable: false),
|
||||
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
dateadded = table.Column<DateTime>(type: "timestamp without time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_stickyroles", x => x.id);
|
||||
});
|
||||
|
||||
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
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("senddmgreetmessage");
|
||||
|
||||
b.Property<bool>("StickyRoles")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("stickyroles");
|
||||
|
||||
b.Property<string>("TimeZoneId")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("timezoneid");
|
||||
@@ -2124,6 +2128,42 @@ namespace NadekoBot.Db.Migrations
|
||||
b.ToTable("slowmodeignoreduser", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StickyRole", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<decimal>("GuildId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("guildid");
|
||||
|
||||
b.Property<string>("RoleIds")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("roleids");
|
||||
|
||||
b.Property<decimal>("UserId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.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")
|
||||
|
2947
src/NadekoBot/Migrations/Sqlite/20240423153708_sticky-roles.Designer.cs
generated
Normal file
2947
src/NadekoBot/Migrations/Sqlite/20240423153708_sticky-roles.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace NadekoBot.Db.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class stickyroles : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "StickyRoles",
|
||||
table: "GuildConfigs",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "StickyRoles",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
RoleIds = table.Column<string>(type: "TEXT", nullable: false),
|
||||
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
DateAdded = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_StickyRoles", x => x.Id);
|
||||
});
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
@@ -729,6 +729,9 @@ namespace NadekoBot.Db.Migrations.Sqlite
|
||||
b.Property<bool>("SendDmGreetMessage")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("StickyRoles")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("TimeZoneId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
@@ -1577,6 +1580,33 @@ namespace NadekoBot.Db.Migrations.Sqlite
|
||||
b.ToTable("SlowmodeIgnoredUser");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StickyRole", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<ulong>("GuildId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("RoleIds")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<ulong>("UserId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("GuildId", "UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("StickyRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Nadeko.Bot.Db.Models.StreamRoleBlacklistedUser", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
Reference in New Issue
Block a user