Updated Migrations files

This commit is contained in:
Toastie 2024-06-26 21:03:14 +12:00
parent 0f927a3dd1
commit ed7deeb99d
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
47 changed files with 10652 additions and 135 deletions

View file

@ -1418,7 +1418,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1422,7 +1422,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1451,7 +1451,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1451,7 +1451,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1521,7 +1521,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1554,7 +1554,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1558,7 +1558,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1596,7 +1596,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1600,7 +1600,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1588,7 +1588,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1592,7 +1592,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1592,7 +1592,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1621,7 +1621,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1654,7 +1654,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1658,7 +1658,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1666,7 +1666,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1670,7 +1670,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1700,7 +1700,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1670,7 +1670,7 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EllieBot.Migrations.Mysql
{
/// <inheritdoc />
public partial class removepatronlimits : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "patronquotas");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "patronquotas",
columns: table => new
{
userid = table.Column<ulong>(type: "bigint unsigned", nullable: false),
featuretype = table.Column<int>(type: "int", nullable: false),
feature = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
dailycount = table.Column<uint>(type: "int unsigned", nullable: false),
hourlycount = table.Column<uint>(type: "int unsigned", nullable: false),
monthlycount = table.Column<uint>(type: "int unsigned", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "ix_patronquotas_userid",
table: "patronquotas",
column: "userid");
}
}
}

View file

@ -1718,41 +1718,6 @@ namespace EllieBot.Migrations.Mysql
b.ToTable("expressions", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b =>
{
b.Property<ulong>("UserId")
.HasColumnType("bigint unsigned")
.HasColumnName("userid");
b.Property<int>("FeatureType")
.HasColumnType("int")
.HasColumnName("featuretype");
b.Property<string>("Feature")
.HasColumnType("varchar(255)")
.HasColumnName("feature");
b.Property<uint>("DailyCount")
.HasColumnType("int unsigned")
.HasColumnName("dailycount");
b.Property<uint>("HourlyCount")
.HasColumnType("int unsigned")
.HasColumnName("hourlycount");
b.Property<uint>("MonthlyCount")
.HasColumnType("int unsigned")
.HasColumnName("monthlycount");
b.HasKey("UserId", "FeatureType", "Feature")
.HasName("pk_patronquotas");
b.HasIndex("UserId")
.HasDatabaseName("ix_patronquotas_userid");
b.ToTable("patronquotas", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b =>
{
b.Property<ulong>("UserId")

View file

@ -1490,7 +1490,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1521,7 +1521,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1521,7 +1521,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1591,7 +1591,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1626,7 +1626,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1630,7 +1630,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1670,7 +1670,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1674,7 +1674,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1662,7 +1662,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1666,7 +1666,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1666,7 +1666,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1697,7 +1697,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1732,7 +1732,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1736,7 +1736,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1744,7 +1744,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1748,7 +1748,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Services.Database.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Services.Database.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1699,7 +1699,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

View file

@ -1669,7 +1669,7 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("muteduserid", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.NadekoExpression", b =>
modelBuilder.Entity("EllieBot.Db.Models.EllieExpression", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EllieBot.Migrations.PostgreSql
{
/// <inheritdoc />
public partial class removepatronlimits : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "patronquotas");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "patronquotas",
columns: table => new
{
userid = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
featuretype = table.Column<int>(type: "integer", nullable: false),
feature = table.Column<string>(type: "text", nullable: false),
dailycount = table.Column<long>(type: "bigint", nullable: false),
hourlycount = table.Column<long>(type: "bigint", nullable: false),
monthlycount = table.Column<long>(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("pk_patronquotas", x => new { x.userid, x.featuretype, x.feature });
});
migrationBuilder.CreateIndex(
name: "ix_patronquotas_userid",
table: "patronquotas",
column: "userid");
}
}
}

View file

@ -1717,41 +1717,6 @@ namespace EllieBot.Migrations.PostgreSql
b.ToTable("expressions", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b =>
{
b.Property<decimal>("UserId")
.HasColumnType("numeric(20,0)")
.HasColumnName("userid");
b.Property<int>("FeatureType")
.HasColumnType("integer")
.HasColumnName("featuretype");
b.Property<string>("Feature")
.HasColumnType("text")
.HasColumnName("feature");
b.Property<long>("DailyCount")
.HasColumnType("bigint")
.HasColumnName("dailycount");
b.Property<long>("HourlyCount")
.HasColumnType("bigint")
.HasColumnName("hourlycount");
b.Property<long>("MonthlyCount")
.HasColumnType("bigint")
.HasColumnName("monthlycount");
b.HasKey("UserId", "FeatureType", "Feature")
.HasName("pk_patronquotas");
b.HasIndex("UserId")
.HasDatabaseName("ix_patronquotas_userid");
b.ToTable("patronquotas", (string)null);
});
modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b =>
{
b.Property<decimal>("UserId")

View file

@ -12,7 +12,7 @@ namespace EllieBot.Migrations
protected override void Up(MigrationBuilder migrationBuilder)
{
MigrationQueries.GuildConfigCleanup(migrationBuilder);
migrationBuilder.DropForeignKey(
name: "FK_AntiRaidSetting_GuildConfigs_GuildConfigId",
table: "AntiRaidSetting");

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EllieBot.Migrations
{
/// <inheritdoc />
public partial class removepatronlimits : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PatronQuotas");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PatronQuotas",
columns: table => new
{
UserId = table.Column<ulong>(type: "INTEGER", nullable: false),
FeatureType = table.Column<int>(type: "INTEGER", nullable: false),
Feature = table.Column<string>(type: "TEXT", nullable: false),
DailyCount = table.Column<uint>(type: "INTEGER", nullable: false),
HourlyCount = table.Column<uint>(type: "INTEGER", nullable: false),
MonthlyCount = table.Column<uint>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PatronQuotas", x => new { x.UserId, x.FeatureType, x.Feature });
});
migrationBuilder.CreateIndex(
name: "IX_PatronQuotas_UserId",
table: "PatronQuotas",
column: "UserId");
}
}
}

View file

@ -1279,33 +1279,6 @@ namespace EllieBot.Migrations
b.ToTable("Expressions");
});
modelBuilder.Entity("EllieBot.Db.Models.PatronQuota", b =>
{
b.Property<ulong>("UserId")
.HasColumnType("INTEGER");
b.Property<int>("FeatureType")
.HasColumnType("INTEGER");
b.Property<string>("Feature")
.HasColumnType("TEXT");
b.Property<uint>("DailyCount")
.HasColumnType("INTEGER");
b.Property<uint>("HourlyCount")
.HasColumnType("INTEGER");
b.Property<uint>("MonthlyCount")
.HasColumnType("INTEGER");
b.HasKey("UserId", "FeatureType", "Feature");
b.HasIndex("UserId");
b.ToTable("PatronQuotas");
});
modelBuilder.Entity("EllieBot.Db.Models.PatronUser", b =>
{
b.Property<ulong>("UserId")