Properly configure foreign keys
This commit is contained in:
parent
a07ad71222
commit
ea0a9c2cca
|
@ -165,11 +165,13 @@ namespace Jellyfin.Server.Implementations
|
|||
modelBuilder.Entity<User>()
|
||||
.HasMany(u => u.Permissions)
|
||||
.WithOne()
|
||||
.HasForeignKey(p => p.UserId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
modelBuilder.Entity<User>()
|
||||
.HasMany(u => u.Preferences)
|
||||
.WithOne()
|
||||
.HasForeignKey(p => p.UserId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
modelBuilder.Entity<User>()
|
||||
|
|
Loading…
Reference in New Issue
Block a user