Repository navigation
feat: reset change history for unarchive events - #233
Merged
Merged
Conversation
massimoalbarello
added a commit
that referenced
this pull request
Oct 25, 2026
## Why Archiving preserves entities, pages, and assets, but the dashboard provides no way to recover them when an agent archives one by mistake. This builds on merged #233, which reset the disposable change log and prepared the unarchived history action. ## How Add independent status and visibility filters to all three collections. All options stay selectable, and Archived + Public shows the normal empty result. Archived resources remain read-only, with Unarchive available only in full detail. Blocked attempts and request errors use a dismissible dialog matching publication feedback. Restoration checks archived dependencies, preserves content and revisions, rebuilds portrait references, and records an unarchived event with a success notification. Future archives retain their search indexes; older missing indexes are neither rebuilt nor backfilled. The change-log reset is already in main through #233.
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.
Why
Dashboard recovery in #232 needs an explicit unarchived history event, but the deployed change-log constraint rejects it. SQLite cannot extend that constraint with ALTER TABLE. For this upgrade, existing change history is disposable, so we deliberately start a fresh log instead of copying old history into a replacement table.
How
Add migration 0016 to drop and recreate resource_change and its index with unarchived allowed. Deploying this migration deletes all existing change history on the instance; entities, pages, assets, records, and revisions are retained. The migration runs transactionally once, and subsequent startups preserve newly recorded events.
Expose the action in the history API and UI so #232 can record restorations. Keep applied migrations and the migration runner unchanged, and update the compatibility policy to protect deployed schemas while allowing breaking API changes.