Properly configure foreign keys

pull/5623/head
Patrick Barron 4 years ago
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…
Cancel
Save