Fix: skip SQLite backup requirements for non-SQLite DBs

Previously, the migration system would attempt to back up the legacy SQLite library.db file even when running with non-SQLite providers (e.g., PostgreSQL), causing startup errors. This was due to SQLite-specific migrations not being filtered out during backup requirement aggregation. This commit adds filtering to exclude migrations marked as RequiresSqlite from backup processing unless the provider is actually SQLite (currently unsupported). This prevents erroneous backup attempts and ensures only relevant migrations and backups are processed. Documentation has been updated to explain the issue and solution.
This commit is contained in:
2026-03-02 10:12:20 -05:00
parent 623af06e46
commit 163a037642
2 changed files with 164 additions and 0 deletions
@@ -397,8 +397,13 @@ internal class JellyfinMigrationService
};
}
// Filter out SQLite-specific migrations when determining backup requirements
// SQLite is no longer supported as a runtime provider
bool isSqliteProvider = false;
backupInstruction = Migrations.SelectMany(e => e)
.Where(e => appliedMigrations.All(f => f.MigrationId != e.BuildCodeMigrationId()))
.Where(e => isSqliteProvider || !e.Metadata.RequiresSqlite) // Skip SQLite migrations for non-SQLite providers
.Select(e => e.BackupRequirements)
.Where(e => e is not null)
.Aggregate(backupInstruction, MergeBackupAttributes!);