notify, minesweeper, migrations

renames, refactors
remind optimized wait
This commit is contained in:
Toastie 2024-12-08 17:07:17 +13:00
parent 204db02cd9
commit 6bc55cd97f
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
32 changed files with 8283 additions and 245 deletions
src/EllieBot/Db

View file

@ -74,6 +74,35 @@ public abstract class EllieContext : DbContext
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
#region Notify
modelBuilder.Entity<Notify>(e =>
{
e.HasAlternateKey(x => new
{
x.GuildId,
x.Event
});
});
#endregion
#region TempRoles
modelBuilder.Entity<TempRole>(e =>
{
e.HasAlternateKey(x => new
{
x.GuildId,
x.UserId,
x.RoleId
});
e.HasIndex(x => x.ExpiresAt);
});
#endregion
#region GuildColors
modelBuilder.Entity<GuildColors>()
@ -449,7 +478,6 @@ public abstract class EllieContext : DbContext
xps.HasIndex(x => x.UserId);
xps.HasIndex(x => x.GuildId);
xps.HasIndex(x => x.Xp);
xps.HasIndex(x => x.AwardedXp);
#endregion