fix: Remove accounts table check from migration detection logic - #25
Closed
upmcplanetracker wants to merge 9 commits into
Closed
upmcplanetracker wants to merge 9 commits into
upmcplanetracker wants to merge 9 commits into
Conversation
Removed accounts check from PostgreSQL data migration script.
This workflow builds and pushes a debug image with optional sanitizer types and creates a multi-architecture manifest.
Removed ARM64 build configuration from the workflow.
Add conditional installation of sanitizer libraries for GCC based on build argument.
Refactor sanitizer library installation and update runtime libraries for PostgreSQL client.
Updated Dockerfile to clarify comments and modify sanitizer installation.
Removed unnecessary sanitizer libraries from build dependencies.
Author
|
closing, project doesn't seem actively maintained. |
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.
re issue #24
The Problem
When the PostgreSQL schema is first initialized, the container creates a default
Administratoraccount (and apreferencesrow) as bootstrap data. The migration detection logic inmigrate_lib.shcurrently checks three tables:metadata_itemslibrary_sectionsaccountsIf any of these tables contain rows, the migration is skipped. This is incorrect, because the
accountstable always contains a row even before any user data has been migrated.As a result, users with an existing SQLite database see:
… and the migration never runs, despite having an empty library.
The Fix
We remove the
accountscheck entirely. The migration is skipped only if there is actual library content, i.e. rows inmetadata_itemsorlibrary_sections. The default administrator account is bootstrap data and should not block the migration.Code change (in
scripts/migrate_lib.sh)The corresponding log message is also updated to avoid mentioning
accounts:Testing
check_and_migratedetects thatmetadata_items=0andlibrary_sections=0and proceeds.MIGRATION_INTERACTIVE=0) now also works correctly.Additional Notes
SIGSEGVcrash reported in the original issue – that is a separate bug in the Rust shim and will be handled in a different PR.accountstable is still present and functional; we simply no longer use it to decide whether to skip migration.