forked from EllieBotDevs/elliebot
fixed protection commands not properly turning on
This commit is contained in:
parent
77628be826
commit
62a01d3d06
11 changed files with 22 additions and 41 deletions
src/EllieBot
Db/Models
Migrations
|
@ -1,3 +1,4 @@
|
|||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
@ -17,7 +18,7 @@ public class FollowedStream
|
|||
public int Id { get; set; }
|
||||
public ulong GuildId { get; set; }
|
||||
public ulong ChannelId { get; set; }
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string Username { get; set; }
|
||||
public string? PrettyName { get; set; } = null;
|
||||
public FType Type { get; set; }
|
||||
public string? Message { get; set; } = null;
|
||||
|
|
|
@ -11,11 +11,7 @@ public class AntiAltSetting
|
|||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int GuildConfigId { get; set; }
|
||||
|
||||
public ulong GuildId { get; set; }
|
||||
|
||||
public TimeSpan MinAge { get; set; }
|
||||
public PunishmentAction Action { get; set; }
|
||||
public int ActionDurationMinutes { get; set; }
|
||||
|
|
|
@ -8,8 +8,6 @@ namespace EllieBot.Db.Models;
|
|||
#nullable disable
|
||||
public class AntiSpamSetting : DbEntity
|
||||
{
|
||||
public int GuildConfigId { get; set; }
|
||||
|
||||
public ulong GuildId { get; set; }
|
||||
|
||||
public PunishmentAction Action { get; set; }
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
START TRANSACTION;
|
||||
ALTER TABLE antispamsetting DROP COLUMN guildconfigid;
|
||||
|
||||
ALTER TABLE antialtsetting DROP COLUMN guildconfigid;
|
||||
|
||||
INSERT INTO "__EFMigrationsHistory" (migrationid, productversion)
|
||||
VALUES ('20250315225518_prot-delete-gcid', '9.0.1');
|
||||
|
||||
COMMIT;
|
|
@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||
namespace EllieBot.Migrations.PostgreSql
|
||||
{
|
||||
[DbContext(typeof(PostgreSqlContext))]
|
||||
[Migration("20250315193847_init")]
|
||||
[Migration("20250315225539_init")]
|
||||
partial class init
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
@ -42,10 +42,6 @@ namespace EllieBot.Migrations.PostgreSql
|
|||
.HasColumnType("integer")
|
||||
.HasColumnName("actiondurationminutes");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<decimal>("GuildId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("guildid");
|
||||
|
@ -158,10 +154,6 @@ namespace EllieBot.Migrations.PostgreSql
|
|||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<decimal>("GuildId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("guildid");
|
|
@ -18,7 +18,6 @@ namespace EllieBot.Migrations.PostgreSql
|
|||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
guildconfigid = table.Column<int>(type: "integer", nullable: false),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
minage = table.Column<TimeSpan>(type: "interval", nullable: false),
|
||||
action = table.Column<int>(type: "integer", nullable: false),
|
||||
|
@ -54,7 +53,6 @@ namespace EllieBot.Migrations.PostgreSql
|
|||
{
|
||||
id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
guildconfigid = table.Column<int>(type: "integer", nullable: false),
|
||||
guildid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
action = table.Column<int>(type: "integer", nullable: false),
|
||||
messagethreshold = table.Column<int>(type: "integer", nullable: false),
|
|
@ -39,10 +39,6 @@ namespace EllieBot.Migrations.PostgreSql
|
|||
.HasColumnType("integer")
|
||||
.HasColumnName("actiondurationminutes");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<decimal>("GuildId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("guildid");
|
||||
|
@ -155,10 +151,6 @@ namespace EllieBot.Migrations.PostgreSql
|
|||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnName("dateadded");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("guildconfigid");
|
||||
|
||||
b.Property<decimal>("GuildId")
|
||||
.HasColumnType("numeric(20,0)")
|
||||
.HasColumnName("guildid");
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
BEGIN TRANSACTION;
|
||||
ALTER TABLE "AntiSpamSetting" DROP COLUMN "GuildConfigId";
|
||||
|
||||
ALTER TABLE "AntiAltSetting" DROP COLUMN "GuildConfigId";
|
||||
|
||||
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
|
||||
VALUES ('20250315225515_prot-delete-gcid', '9.0.1');
|
||||
|
||||
COMMIT;
|
|
@ -11,7 +11,7 @@ using EllieBot.Db;
|
|||
namespace EllieBot.Migrations.Sqlite
|
||||
{
|
||||
[DbContext(typeof(SqliteContext))]
|
||||
[Migration("20250315193844_init")]
|
||||
[Migration("20250315225536_init")]
|
||||
partial class init
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
@ -32,9 +32,6 @@ namespace EllieBot.Migrations.Sqlite
|
|||
b.Property<int>("ActionDurationMinutes")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("GuildId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
@ -118,9 +115,6 @@ namespace EllieBot.Migrations.Sqlite
|
|||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("GuildId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
|
@ -17,7 +17,6 @@ namespace EllieBot.Migrations.Sqlite
|
|||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
MinAge = table.Column<TimeSpan>(type: "TEXT", nullable: false),
|
||||
Action = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
|
@ -53,7 +52,6 @@ namespace EllieBot.Migrations.Sqlite
|
|||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuildConfigId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
GuildId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
Action = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
MessageThreshold = table.Column<int>(type: "INTEGER", nullable: false),
|
|
@ -29,9 +29,6 @@ namespace EllieBot.Migrations.Sqlite
|
|||
b.Property<int>("ActionDurationMinutes")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("GuildId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
@ -115,9 +112,6 @@ namespace EllieBot.Migrations.Sqlite
|
|||
b.Property<DateTime?>("DateAdded")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("GuildConfigId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<ulong>("GuildId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue