db changes

This commit is contained in:
defnotken
2025-09-16 15:03:15 -05:00
parent 81261fae49
commit 0df7ee424d
5 changed files with 15 additions and 9 deletions

View File

@@ -71,6 +71,9 @@ public class LightlessDbContext : DbContext
mb.Entity<BannedRegistrations>().ToTable("banned_registrations");
mb.Entity<Group>().ToTable("groups");
mb.Entity<Group>().HasIndex(c => c.OwnerUID);
mb.Entity<Group>()
.Property(g => g.CreatedDate)
.HasDefaultValueSql("CURRENT_TIMESTAMP");
mb.Entity<GroupPair>().ToTable("group_pairs");
mb.Entity<GroupPair>().HasKey(u => new { u.GroupGID, u.GroupUserUID });
mb.Entity<GroupPair>().HasIndex(c => c.GroupUserUID);