Rework parental ratings (#12615)
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
OpenAPI / OpenAPI - HEAD (push) Waiting to run
OpenAPI / OpenAPI - BASE (push) Waiting to run
OpenAPI / OpenAPI - Difference (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run

This commit is contained in:
Tim Eisele
2025-03-31 05:51:54 +02:00
committed by GitHub
parent 2ace880345
commit 3fc3b04daf
80 changed files with 3995 additions and 805 deletions

View File

@@ -84,6 +84,8 @@ public class BaseItemEntity
public int? InheritedParentalRatingValue { get; set; }
public int? InheritedParentalRatingSubValue { get; set; }
public string? UnratedType { get; set; }
public float? CriticRating { get; set; }

View File

@@ -249,9 +249,14 @@ namespace Jellyfin.Database.Implementations.Entities
public bool EnableUserPreferenceAccess { get; set; }
/// <summary>
/// Gets or sets the maximum parental age rating.
/// Gets or sets the maximum parental rating score.
/// </summary>
public int? MaxParentalAgeRating { get; set; }
public int? MaxParentalRatingScore { get; set; }
/// <summary>
/// Gets or sets the maximum parental rating sub score.
/// </summary>
public int? MaxParentalRatingSubScore { get; set; }
/// <summary>
/// Gets or sets the remote client bitrate limit.

View File

@@ -0,0 +1,48 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Jellyfin.Server.Implementations.Migrations
{
/// <inheritdoc />
public partial class AddInheritedParentalRatingSubValue : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "MaxParentalAgeRating",
table: "Users",
newName: "MaxParentalRatingScore");
migrationBuilder.AddColumn<int>(
name: "MaxParentalRatingSubScore",
table: "Users",
type: "INTEGER",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "InheritedParentalRatingSubValue",
table: "BaseItems",
type: "INTEGER",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MaxParentalRatingSubScore",
table: "Users");
migrationBuilder.DropColumn(
name: "InheritedParentalRatingValue",
table: "BaseItems");
migrationBuilder.RenameColumn(
name: "MaxParentalRatingScore",
table: "Users",
newName: "MaxParentalAgeRating");
}
}
}

View File

@@ -15,9 +15,9 @@ namespace Jellyfin.Server.Implementations.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.2");
modelBuilder.HasAnnotation("ProductVersion", "9.0.3");
modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -40,9 +40,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("UserId");
b.ToTable("AccessSchedules");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -88,9 +90,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("DateCreated");
b.ToTable("ActivityLogs");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -103,9 +107,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ParentItemId");
b.ToTable("AncestorIds");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -132,9 +138,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasKey("ItemId", "Index");
b.ToTable("AttachmentStreamInfos");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -218,6 +226,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Property<int?>("IndexNumber")
.HasColumnType("INTEGER");
b.Property<int?>("InheritedParentalRatingSubValue")
.HasColumnType("INTEGER");
b.Property<int?>("InheritedParentalRatingValue")
.HasColumnType("INTEGER");
@@ -380,9 +391,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
b.ToTable("BaseItems");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -415,9 +428,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ItemId");
b.ToTable("BaseItemImageInfos");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
{
b.Property<int>("Id")
.HasColumnType("INTEGER");
@@ -430,9 +445,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ItemId");
b.ToTable("BaseItemMetadataFields");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -449,9 +466,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ProviderId", "ProviderValue", "ItemId");
b.ToTable("BaseItemProviders");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
{
b.Property<int>("Id")
.HasColumnType("INTEGER");
@@ -464,9 +483,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ItemId");
b.ToTable("BaseItemTrailerTypes");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -489,9 +510,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasKey("ItemId", "ChapterIndex");
b.ToTable("Chapters");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -521,9 +544,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("CustomItemDisplayPreferences");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -578,9 +603,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("DisplayPreferences");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -600,9 +627,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("DisplayPreferencesId");
b.ToTable("HomeSection");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -625,9 +654,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("ImageInfos");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -669,9 +700,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("UserId");
b.ToTable("ItemDisplayPreferences");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
{
b.Property<Guid>("ItemValueId")
.ValueGeneratedOnAdd()
@@ -694,9 +727,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("ItemValues");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
{
b.Property<Guid>("ItemValueId")
.HasColumnType("TEXT");
@@ -709,9 +744,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ItemId");
b.ToTable("ItemValuesMap");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -736,9 +773,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasKey("Id");
b.ToTable("MediaSegments");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -889,9 +928,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("StreamIndex", "StreamType", "Language");
b.ToTable("MediaStreamInfos");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -909,9 +950,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("Name");
b.ToTable("Peoples");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -937,9 +980,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ItemId", "SortOrder");
b.ToTable("PeopleBaseItemMap");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -968,9 +1013,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.HasFilter("[UserId] IS NOT NULL");
b.ToTable("Permissions");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1001,9 +1048,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.HasFilter("[UserId] IS NOT NULL");
b.ToTable("Preferences");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1030,9 +1079,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("ApiKeys");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1088,9 +1139,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("UserId", "DeviceId");
b.ToTable("Devices");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1109,9 +1162,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("DeviceOptions");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -1140,9 +1195,11 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasKey("ItemId", "Width");
b.ToTable("TrickplayInfos");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -1200,7 +1257,10 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Property<int>("MaxActiveSessions")
.HasColumnType("INTEGER");
b.Property<int?>("MaxParentalAgeRating")
b.Property<int?>("MaxParentalRatingScore")
.HasColumnType("INTEGER");
b.Property<int?>("MaxParentalRatingSubScore")
.HasColumnType("INTEGER");
b.Property<bool>("MustUpdatePassword")
@@ -1252,9 +1312,11 @@ namespace Jellyfin.Server.Implementations.Migrations
.IsUnique();
b.ToTable("Users");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
{
b.Property<Guid>("ItemId")
.HasColumnType("TEXT");
@@ -1305,26 +1367,28 @@ namespace Jellyfin.Server.Implementations.Migrations
b.HasIndex("ItemId", "UserId", "Played");
b.ToTable("UserData");
b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
});
modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
.WithMany("AccessSchedules")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Jellyfin.Data.Entities.AncestorId", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("Children")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "ParentItem")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
.WithMany("ParentAncestors")
.HasForeignKey("ParentItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1335,9 +1399,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("ParentItem");
});
modelBuilder.Entity("Jellyfin.Data.Entities.AttachmentStreamInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany()
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1346,9 +1410,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemImageInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("Images")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1357,9 +1421,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemMetadataField", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("LockedFields")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1368,9 +1432,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemProvider", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("Provider")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1379,9 +1443,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemTrailerType", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("TrailerTypes")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1390,9 +1454,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.Chapter", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("Chapters")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1401,50 +1465,50 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
.WithMany("DisplayPreferences")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
{
b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
.WithMany("HomeSections")
.HasForeignKey("DisplayPreferencesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
.WithOne("ProfileImage")
.HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
.HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
.WithMany("ItemDisplayPreferences")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Jellyfin.Data.Entities.ItemValueMap", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("ItemValues")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Jellyfin.Data.Entities.ItemValue", "ItemValue")
b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
.WithMany("BaseItemsMap")
.HasForeignKey("ItemValueId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1455,9 +1519,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("ItemValue");
});
modelBuilder.Entity("Jellyfin.Data.Entities.MediaStreamInfo", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("MediaStreams")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1466,15 +1530,15 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("Item");
});
modelBuilder.Entity("Jellyfin.Data.Entities.PeopleBaseItemMap", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("Peoples")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Jellyfin.Data.Entities.People", "People")
b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
.WithMany("BaseItems")
.HasForeignKey("PeopleId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1485,25 +1549,25 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("People");
});
modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
.WithMany("Permissions")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
.WithMany("Preferences")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", "User")
b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1512,15 +1576,15 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("User");
});
modelBuilder.Entity("Jellyfin.Data.Entities.UserData", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
{
b.HasOne("Jellyfin.Data.Entities.BaseItemEntity", "Item")
b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
.WithMany("UserData")
.HasForeignKey("ItemId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Jellyfin.Data.Entities.User", "User")
b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1531,7 +1595,7 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("User");
});
modelBuilder.Entity("Jellyfin.Data.Entities.BaseItemEntity", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
{
b.Navigation("Chapters");
@@ -1556,22 +1620,22 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Navigation("UserData");
});
modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
{
b.Navigation("HomeSections");
});
modelBuilder.Entity("Jellyfin.Data.Entities.ItemValue", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
{
b.Navigation("BaseItemsMap");
});
modelBuilder.Entity("Jellyfin.Data.Entities.People", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
{
b.Navigation("BaseItems");
});
modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
{
b.Navigation("AccessSchedules");