PostgreSQL migration: schema fixes, docs, and tooling
- Assign all tables to correct PostgreSQL schemas in EF Core migrations - Fix identifier quoting: replace SQL Server brackets with PostgreSQL double quotes - Use InsertData for placeholder BaseItems row (no raw SQL) - Remove obsolete/Windows publish profiles; set Linux as default - Add detailed migration success and verification reports (Markdown) - Add idempotent, production-ready SQL migration scripts - Add PowerShell script for automated migration verification - Ensures robust, production-ready PostgreSQL migration and documentation
This commit is contained in:
+31
-31
@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
{
|
||||
[DbContext(typeof(JellyfinDbContext))]
|
||||
[Migration("20260222222702_InitialCreate")]
|
||||
[Migration("20260226165957_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -49,7 +49,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AccessSchedules");
|
||||
b.ToTable("AccessSchedules", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
|
||||
@@ -99,7 +99,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("DateCreated");
|
||||
|
||||
b.ToTable("ActivityLogs");
|
||||
b.ToTable("ActivityLogs", "activitylog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
|
||||
@@ -114,7 +114,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ParentItemId");
|
||||
|
||||
b.ToTable("AncestorIds");
|
||||
b.ToTable("AncestorIds", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
|
||||
@@ -142,7 +142,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId", "Index");
|
||||
|
||||
b.ToTable("AttachmentStreamInfos");
|
||||
b.ToTable("AttachmentStreamInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
|
||||
@@ -393,7 +393,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
|
||||
|
||||
b.ToTable("BaseItems");
|
||||
b.ToTable("BaseItems", "library");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
@@ -443,7 +443,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("BaseItemImageInfos");
|
||||
b.ToTable("BaseItemImageInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
|
||||
@@ -458,7 +458,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("BaseItemMetadataFields");
|
||||
b.ToTable("BaseItemMetadataFields", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
|
||||
@@ -477,7 +477,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ProviderId", "ProviderValue", "ItemId");
|
||||
|
||||
b.ToTable("BaseItemProviders");
|
||||
b.ToTable("BaseItemProviders", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
|
||||
@@ -492,7 +492,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("BaseItemTrailerTypes");
|
||||
b.ToTable("BaseItemTrailerTypes", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
|
||||
@@ -517,7 +517,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId", "ChapterIndex");
|
||||
|
||||
b.ToTable("Chapters");
|
||||
b.ToTable("Chapters", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
|
||||
@@ -551,7 +551,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("UserId", "ItemId", "Client", "Key")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("CustomItemDisplayPreferences");
|
||||
b.ToTable("CustomItemDisplayPreferences", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
|
||||
@@ -610,7 +610,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("UserId", "ItemId", "Client")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DisplayPreferences");
|
||||
b.ToTable("DisplayPreferences", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
|
||||
@@ -634,7 +634,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("DisplayPreferencesId");
|
||||
|
||||
b.ToTable("HomeSection");
|
||||
b.ToTable("HomeSection", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
|
||||
@@ -661,7 +661,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ImageInfos");
|
||||
b.ToTable("ImageInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
|
||||
@@ -707,7 +707,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("ItemDisplayPreferences");
|
||||
b.ToTable("ItemDisplayPreferences", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
|
||||
@@ -734,7 +734,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("Type", "Value")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ItemValues");
|
||||
b.ToTable("ItemValues", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
|
||||
@@ -749,7 +749,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("ItemValuesMap");
|
||||
b.ToTable("ItemValuesMap", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
|
||||
@@ -765,7 +765,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId");
|
||||
|
||||
b.ToTable("KeyframeData");
|
||||
b.ToTable("KeyframeData", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
|
||||
@@ -792,7 +792,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("MediaSegments");
|
||||
b.ToTable("MediaSegments", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
|
||||
@@ -948,7 +948,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("StreamIndex", "StreamType", "Language");
|
||||
|
||||
b.ToTable("MediaStreamInfos");
|
||||
b.ToTable("MediaStreamInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
|
||||
@@ -968,7 +968,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("Peoples");
|
||||
b.ToTable("Peoples", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
|
||||
@@ -996,7 +996,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId", "SortOrder");
|
||||
|
||||
b.ToTable("PeopleBaseItemMap");
|
||||
b.ToTable("PeopleBaseItemMap", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
|
||||
@@ -1029,7 +1029,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
.IsUnique()
|
||||
.HasFilter("[UserId] IS NOT NULL");
|
||||
|
||||
b.ToTable("Permissions");
|
||||
b.ToTable("Permissions", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
|
||||
@@ -1064,7 +1064,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
.IsUnique()
|
||||
.HasFilter("[UserId] IS NOT NULL");
|
||||
|
||||
b.ToTable("Preferences");
|
||||
b.ToTable("Preferences", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
|
||||
@@ -1095,7 +1095,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("AccessToken")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ApiKeys");
|
||||
b.ToTable("ApiKeys", "authentication");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
|
||||
@@ -1155,7 +1155,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("UserId", "DeviceId");
|
||||
|
||||
b.ToTable("Devices");
|
||||
b.ToTable("Devices", "authentication");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
|
||||
@@ -1178,7 +1178,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("DeviceId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceOptions");
|
||||
b.ToTable("DeviceOptions", "authentication");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
|
||||
@@ -1209,7 +1209,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId", "Width");
|
||||
|
||||
b.ToTable("TrickplayInfos");
|
||||
b.ToTable("TrickplayInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
|
||||
@@ -1324,7 +1324,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("Username")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Users");
|
||||
b.ToTable("Users", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
|
||||
@@ -1380,7 +1380,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId", "UserId", "Played");
|
||||
|
||||
b.ToTable("UserData");
|
||||
b.ToTable("UserData", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
|
||||
+19
-20
@@ -12,12 +12,20 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// Create schemas to organize tables by their legacy database origin
|
||||
migrationBuilder.EnsureSchema(name: "activitylog");
|
||||
migrationBuilder.EnsureSchema(name: "authentication");
|
||||
migrationBuilder.EnsureSchema(name: "displaypreferences");
|
||||
migrationBuilder.EnsureSchema(name: "library");
|
||||
migrationBuilder.EnsureSchema(name: "users");
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "users");
|
||||
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "activitylog");
|
||||
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "library");
|
||||
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "authentication");
|
||||
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "displaypreferences");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ActivityLogs",
|
||||
@@ -844,20 +852,11 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
// Insert placeholder BaseItem for orphaned UserData
|
||||
// Using raw SQL to avoid entity mapping issues with schema-qualified tables during migration
|
||||
migrationBuilder.Sql(@"
|
||||
INSERT INTO library.""BaseItems"" (
|
||||
""Id"", ""Type"", ""Name"", ""IsFolder"", ""IsInMixedFolder"", ""IsLocked"", ""IsMovie"",
|
||||
""IsRepeat"", ""IsSeries"", ""IsVirtualItem""
|
||||
)
|
||||
VALUES (
|
||||
'00000000-0000-0000-0000-000000000001'::uuid,
|
||||
'PLACEHOLDER',
|
||||
'This is a placeholder item for UserData that has been detacted from its original item',
|
||||
false, false, false, false, false, false, false
|
||||
);
|
||||
");
|
||||
migrationBuilder.InsertData(
|
||||
schema: "library",
|
||||
table: "BaseItems",
|
||||
columns: new[] { "Id", "Album", "AlbumArtists", "Artists", "Audio", "ChannelId", "CleanName", "CommunityRating", "CriticRating", "CustomRating", "Data", "DateCreated", "DateLastMediaAdded", "DateLastRefreshed", "DateLastSaved", "DateModified", "EndDate", "EpisodeTitle", "ExternalId", "ExternalSeriesId", "ExternalServiceId", "ExtraIds", "ExtraType", "ForcedSortName", "Genres", "Height", "IndexNumber", "InheritedParentalRatingSubValue", "InheritedParentalRatingValue", "IsFolder", "IsInMixedFolder", "IsLocked", "IsMovie", "IsRepeat", "IsSeries", "IsVirtualItem", "LUFS", "MediaType", "Name", "NormalizationGain", "OfficialRating", "OriginalTitle", "Overview", "OwnerId", "ParentId", "ParentIndexNumber", "Path", "PreferredMetadataCountryCode", "PreferredMetadataLanguage", "PremiereDate", "PresentationUniqueKey", "PrimaryVersionId", "ProductionLocations", "ProductionYear", "RunTimeTicks", "SeasonId", "SeasonName", "SeriesId", "SeriesName", "SeriesPresentationUniqueKey", "ShowId", "Size", "SortName", "StartDate", "Studios", "Tagline", "Tags", "TopParentId", "TotalBitrate", "Type", "UnratedType", "Width" },
|
||||
values: new object[] { new Guid("00000000-0000-0000-0000-000000000001"), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, false, false, false, false, false, false, false, null, null, "This is a placeholder item for UserData that has been detacted from its original item", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "PLACEHOLDER", null, null });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AccessSchedules_UserId",
|
||||
+30
-30
@@ -46,7 +46,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("AccessSchedules");
|
||||
b.ToTable("AccessSchedules", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
|
||||
@@ -96,7 +96,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("DateCreated");
|
||||
|
||||
b.ToTable("ActivityLogs");
|
||||
b.ToTable("ActivityLogs", "activitylog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
|
||||
@@ -111,7 +111,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ParentItemId");
|
||||
|
||||
b.ToTable("AncestorIds");
|
||||
b.ToTable("AncestorIds", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
|
||||
@@ -139,7 +139,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId", "Index");
|
||||
|
||||
b.ToTable("AttachmentStreamInfos");
|
||||
b.ToTable("AttachmentStreamInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
|
||||
@@ -390,7 +390,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
|
||||
|
||||
b.ToTable("BaseItems");
|
||||
b.ToTable("BaseItems", "library");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
@@ -440,7 +440,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("BaseItemImageInfos");
|
||||
b.ToTable("BaseItemImageInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
|
||||
@@ -455,7 +455,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("BaseItemMetadataFields");
|
||||
b.ToTable("BaseItemMetadataFields", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
|
||||
@@ -474,7 +474,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ProviderId", "ProviderValue", "ItemId");
|
||||
|
||||
b.ToTable("BaseItemProviders");
|
||||
b.ToTable("BaseItemProviders", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
|
||||
@@ -489,7 +489,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("BaseItemTrailerTypes");
|
||||
b.ToTable("BaseItemTrailerTypes", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
|
||||
@@ -514,7 +514,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId", "ChapterIndex");
|
||||
|
||||
b.ToTable("Chapters");
|
||||
b.ToTable("Chapters", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
|
||||
@@ -548,7 +548,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("UserId", "ItemId", "Client", "Key")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("CustomItemDisplayPreferences");
|
||||
b.ToTable("CustomItemDisplayPreferences", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
|
||||
@@ -607,7 +607,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("UserId", "ItemId", "Client")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DisplayPreferences");
|
||||
b.ToTable("DisplayPreferences", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
|
||||
@@ -631,7 +631,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("DisplayPreferencesId");
|
||||
|
||||
b.ToTable("HomeSection");
|
||||
b.ToTable("HomeSection", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
|
||||
@@ -658,7 +658,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ImageInfos");
|
||||
b.ToTable("ImageInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
|
||||
@@ -704,7 +704,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("ItemDisplayPreferences");
|
||||
b.ToTable("ItemDisplayPreferences", "displaypreferences");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
|
||||
@@ -731,7 +731,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("Type", "Value")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ItemValues");
|
||||
b.ToTable("ItemValues", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
|
||||
@@ -746,7 +746,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId");
|
||||
|
||||
b.ToTable("ItemValuesMap");
|
||||
b.ToTable("ItemValuesMap", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
|
||||
@@ -762,7 +762,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId");
|
||||
|
||||
b.ToTable("KeyframeData");
|
||||
b.ToTable("KeyframeData", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
|
||||
@@ -789,7 +789,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("MediaSegments");
|
||||
b.ToTable("MediaSegments", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
|
||||
@@ -945,7 +945,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("StreamIndex", "StreamType", "Language");
|
||||
|
||||
b.ToTable("MediaStreamInfos");
|
||||
b.ToTable("MediaStreamInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
|
||||
@@ -965,7 +965,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("Peoples");
|
||||
b.ToTable("Peoples", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
|
||||
@@ -993,7 +993,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId", "SortOrder");
|
||||
|
||||
b.ToTable("PeopleBaseItemMap");
|
||||
b.ToTable("PeopleBaseItemMap", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
|
||||
@@ -1026,7 +1026,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
.IsUnique()
|
||||
.HasFilter("[UserId] IS NOT NULL");
|
||||
|
||||
b.ToTable("Permissions");
|
||||
b.ToTable("Permissions", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
|
||||
@@ -1061,7 +1061,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
.IsUnique()
|
||||
.HasFilter("[UserId] IS NOT NULL");
|
||||
|
||||
b.ToTable("Preferences");
|
||||
b.ToTable("Preferences", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
|
||||
@@ -1092,7 +1092,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("AccessToken")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ApiKeys");
|
||||
b.ToTable("ApiKeys", "authentication");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
|
||||
@@ -1152,7 +1152,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("UserId", "DeviceId");
|
||||
|
||||
b.ToTable("Devices");
|
||||
b.ToTable("Devices", "authentication");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
|
||||
@@ -1175,7 +1175,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("DeviceId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceOptions");
|
||||
b.ToTable("DeviceOptions", "authentication");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
|
||||
@@ -1206,7 +1206,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasKey("ItemId", "Width");
|
||||
|
||||
b.ToTable("TrickplayInfos");
|
||||
b.ToTable("TrickplayInfos", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
|
||||
@@ -1321,7 +1321,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
b.HasIndex("Username")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Users");
|
||||
b.ToTable("Users", "users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
|
||||
@@ -1377,7 +1377,7 @@ namespace Jellyfin.Database.Providers.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ItemId", "UserId", "Played");
|
||||
|
||||
b.ToTable("UserData");
|
||||
b.ToTable("UserData", "library");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
|
||||
|
||||
Reference in New Issue
Block a user