Repository navigation
Conversation
User ZIP backups currently contain stations, logbooks and QSOs but omit their uploaded images. This change includes QSL, eQSL, SSTV and diary images, and restores their associations after record IDs change. It also preserves station-to-logbook relationships. The new schema (1.1) records attachment paths and SHA-256 checksums. Imports validate image formats, checksums and size limits, reuse existing records and attachments, and use a database transaction with cleanup of newly created files on failure. Diary entries with images can be restored optionally; newly created diary entries are private. Older backups without attachments remain supported. The preview displays attachment counts and missing-source-file notices; the result displays the number of restored attachments. No database migration or update-script changes are required. Validation: - php tests/backup_files_test.php: passed (temporary database tables and temporary files). - PHP syntax checks: passed for the controller, model, three views and test. - git diff --check: passed. - Cypress and browser JavaScript validation: pending; Cypress is not installed locally and existing specs do not cover backup. Limitations: - Only diary entries with available image attachments are included. - Images increase archive size and restore duration; server upload limits still apply. - Import limits: 256 MiB JSON in ZIP, 100 MiB per image, 2 GiB total image data, 100,000 attachment references. - Review and browser validation are still required before publication.
QSO and QSL image tables are MyISAM, so the restore now deletes its own inserts when it fails. Diary HTML is sanitized, and each restored image keeps its own file and diary shortcode.
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.
Summary
[image:ID]shortcodes are remapped.Test plan
docker exec cloudlog-web-1 php tests/backup_files_test.phpMade with Cursor