Repository navigation
fix: conservar el historial de migraciones de codigo al importar desde SQLite - #11
Merged
Merged
Conversation
…e SQLite Jellyfin guarda en __EFMigrationsHistory tanto sus rutinas de codigo como las migraciones del proveedor, y ambos ids comparten la forma yyyyMMddHHmmss_nombre, asi que no se pueden distinguir por formato. Sin ese historial, Jellyfin vuelve a ejecutar rutinas antiguas que esperan library.db y el arranque falla con 'no such table: TypedBaseItems'. Ahora se copian solo los ids que corresponden a un tipo con JellyfinMigrationAttribute, identificados por el nombre de la migracion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué pasaba
Jellyfin registra en
__EFMigrationsHistorytanto sus rutinas de código como las migraciones del proveedor, y todas comparten la formayyyyMMddHHmmss_nombre. El plugin no llevaba el historial de rutinas al importar desde SQLite, así que Jellyfin las volvía a ejecutar al arrancar. Las rutinas antiguas comoRemoveDuplicateExtrasabrenlibrary.db, que en una instalación nueva de 12.x ya no existe, y el arranque fallaba conno such table: TypedBaseItems.Detalle del reporte original que conviene aclarar:
"yyyyMMddHHmmsss"en .NET produce 14 dígitos, no 15, así que el filtro anterior (id[15] == '_') nunca coincidía. Aceptar 14 dígitos tampoco habría servido: los ids de las migraciones de esquema del proveedor también tienen 14, y habrían entrado al historial de PostgreSQL como si estuvieran aplicadas.Qué cambia
JellyfinMigrationAttribute, identificados por el nombre de la migración (RemoveDuplicateExtras,MigrateActivityLogDb, …), no por el formato del id.library.db.Pruebas
ProductVersiony no una migración de esquema; sin tipos descubiertos el historial queda intacto.Fixes #9