Add new migrations framework #232
Open
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.
Having been burned a few times by migration runs, usually due to me pulling on my own during doing some development, I figured it was time to give a go at a revised migration framework that was a little more resilient than just comparing when we last pulled the repo vs today.
This updated framework seeks to be basically a direct ripoff of what Rails does, and has served us well there for years. A small log is kept at
~/.local/share/omarchy/migration.log
(.gitignored) that stores the timestamps of any successful migration runs.The migrations are ran normally via
omarchy-update
as they were before but could also be accessed directly viaomarchy migrate
.There is also a migrations menu added to the
omarchy
TUI to allow access to these functions, though we may want to tuck those away in a deeper menu or only have it available on the CLI. While all of these screenshots are from the TUI, both call the same logic.View Screenshots
Command
Tui
Status
List
Create
Run migrations (normal)
Run migrations (continue on failure prompt)
Re-run migration