feat: add legacy key/data file migration to database

- Add migration_legacy_files_completed flag to SystemSettings model
- Create legacy_file_migration service to migrate series from key/data files
- Integrate legacy migration into initialization_service startup flow
- Add integration tests for legacy file migration
- Update DATABASE.md documentation with migration details
- Fix various test and service issues (nfo_repair, tmdb_client, download_service)
- Add test_database_schema unit tests
This commit is contained in:
2026-05-26 17:44:42 +02:00
parent 50a77976d5
commit cbd53ef2a0
18 changed files with 1274 additions and 89 deletions

View File

@@ -526,8 +526,8 @@ class TestRetryLogic:
assert len(retried_ids) == 1
assert len(download_service._failed_items) == 0
assert len(download_service._pending_queue) == 1
# retry_count stays same when retrying; incremented only on failure
assert download_service._pending_queue[0].retry_count == 0
# retry_count incremented on retry
assert download_service._pending_queue[0].retry_count == 1
assert download_service._pending_queue[0].status == DownloadStatus.PENDING
@pytest.mark.asyncio