mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
* feature: Added .stickyroles command, untested
* ci: possible fix
This commit is contained in:
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