Database changes for syncshell changes
This commit is contained in:
@@ -53,6 +53,7 @@ public class LightlessDbContext : DbContext
|
||||
public DbSet<CharaDataOriginalFile> CharaDataOriginalFiles { get; set; }
|
||||
public DbSet<CharaDataPose> CharaDataPoses { get; set; }
|
||||
public DbSet<CharaDataAllowance> CharaDataAllowances { get; set; }
|
||||
public DbSet<GroupProfile> GroupProfiles { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder mb)
|
||||
{
|
||||
@@ -78,6 +79,14 @@ public class LightlessDbContext : DbContext
|
||||
mb.Entity<GroupBan>().HasKey(u => new { u.GroupGID, u.BannedUserUID });
|
||||
mb.Entity<GroupBan>().HasIndex(c => c.BannedUserUID);
|
||||
mb.Entity<GroupBan>().HasIndex(c => c.GroupGID);
|
||||
mb.Entity<GroupProfile>().ToTable("group_profiles");
|
||||
mb.Entity<GroupProfile>().HasKey(u => u.GroupGID);
|
||||
mb.Entity<GroupProfile>().HasIndex(c => c.GroupGID);
|
||||
mb.Entity<GroupProfile>()
|
||||
.HasOne(gp => gp.Group)
|
||||
.WithMany()
|
||||
.HasForeignKey(gp => gp.GroupGID)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
mb.Entity<GroupTempInvite>().ToTable("group_temp_invites");
|
||||
mb.Entity<GroupTempInvite>().HasKey(u => new { u.GroupGID, u.Invite });
|
||||
mb.Entity<GroupTempInvite>().HasIndex(c => c.GroupGID);
|
||||
|
||||
Reference in New Issue
Block a user