migrations, query fixes, fixes for mysql and postgres. In progress

This commit is contained in:
Toastie 2024-09-12 15:44:35 +12:00
parent b04768633c
commit 40b4ebf0fa
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
29 changed files with 18970 additions and 8070 deletions
src/EllieBot/Db

View file

@ -10,6 +10,7 @@ namespace EllieBot.Db;
public abstract class EllieContext : DbContext
{
public DbSet<GuildConfig> GuildConfigs { get; set; }
public DbSet<GreetSettings> GreetSettings { get; set; }
public DbSet<Quote> Quotes { get; set; }
public DbSet<Reminder> Reminders { get; set; }
@ -678,6 +679,18 @@ public abstract class EllieContext : DbContext
.OnDelete(DeleteBehavior.Cascade);
#endregion
#region GreetSettings
modelBuilder
.Entity<GreetSettings>(gs => gs.HasIndex(x => new
{
x.GuildId,
x.GreetType
})
.IsUnique());
#endregion
}
#if DEBUG