diff options
| author | JPVenson <github@jpb.email> | 2025-04-07 22:42:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 14:42:01 -0600 |
| commit | 77ad7f6139e4911168e2199fe48e78bf7fdddbf1 (patch) | |
| tree | a415dfb53380d3c04677682e0628a44244f16d23 /Jellyfin.Server | |
| parent | 82a561b87d3b6d023168d4604c1030ff936f55f4 (diff) | |
Fix the migration as the new constraint now uses Value as unique key (#13867)
Diffstat (limited to 'Jellyfin.Server')
| -rw-r--r-- | Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs index 3fc9bea84..105fd555f 100644 --- a/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs +++ b/Jellyfin.Server/Migrations/Routines/MigrateLibraryDb.cs @@ -138,14 +138,14 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine """; // EFCores local lookup sucks. We cannot use context.ItemValues.Local here because its just super slow. - var localItems = new Dictionary<(int Type, string CleanValue), (Database.Implementations.Entities.ItemValue ItemValue, List<Guid> ItemIds)>(); + var localItems = new Dictionary<(int Type, string Value), (Database.Implementations.Entities.ItemValue ItemValue, List<Guid> ItemIds)>(); using (new TrackedMigrationStep("loading ItemValues", _logger)) { foreach (SqliteDataReader dto in connection.Query(itemValueQuery)) { var itemId = dto.GetGuid(0); var entity = GetItemValue(dto); - var key = ((int)entity.Type, entity.CleanValue); + var key = ((int)entity.Type, entity.Value); if (!localItems.TryGetValue(key, out var existing)) { localItems[key] = existing = (entity, []); |
