Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitlangton/migraine
A minimalist DB migration manager.
https://github.com/kitlangton/migraine
Last synced: 2 months ago
JSON representation
A minimalist DB migration manager.
- Host: GitHub
- URL: https://github.com/kitlangton/migraine
- Owner: kitlangton
- Created: 2023-01-06T23:37:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T14:19:12.000Z (8 months ago)
- Last Synced: 2024-10-11T08:44:45.896Z (3 months ago)
- Language: Scala
- Size: 55.7 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# migraine
> (***migra***tion eng***ine***)A minimalist DB migration manager.
# Migraine
A minimal, modern database migration tool.
# Todos
- [ ] Configurable database connection
- [ ] CLI
- [ ] Commands
- [ ] migrate
- [ ] preview
- [ ] make-down-migration
- [ ] configure
- [ ] snapshot
- [ ] new-migration
- [ ] reset
- [ ] rollback
- [ ] disambiguate
- [ ] migraine.conf? (home, project root, etc)
- connection info, migration path, etc
- the target local database will change per project
- [ ] Automatic migration tests (RESEARCH NEEDED)
- [ ] Dry Run (by default?) (migraine preview)
- [ ] MVP: Just print out the SQL
- [ ] Schema diff
- [ ] Warn for non-reversible migrations
- [ ] Warn for new columns without default values and not null
- [ ] Errors
- [ ] ensure executed migrations haven't diverged from their stored file (using checksum)
- [ ] Detect when run migrations are missing, no gaps in ids (unless there's a snapshot?).
- [ ] If accidentally duplicated version ids, CLI should help user resolve ambiguity.
- [ ] postgres driver is missing (prompt user to add dependency)
- [ ] database connection issues
- [ ] Warnings
- [ ] adding column to existing table without default value
- [ ] missing migrations folder
- [ ] Rollback
- [ ] UX: Check to see how many migrations were run "recently", or in the
last batch (a group of migrations executed at the same time). If
there's more than just one, ask the user.
- [ ] Editing migrations
- [ ] If a user has edited the mostly recently run migration/migrations and
tries to run migrate again, ask the user if they want to rollback the
prior migration before running the edits. (we could store the SQL text
of the executed migrations... would that get too big?)
- [x] Execute snapshots
- [x] If fresh database, begin from most recent snapshot, otherwise, ignore
snapshots
- [x] Ensure migration metadata is saved transactionally along with migration
- [x] If a migration fails, the metadata and other migrations executed in
the same run should be rolled back.## Prior Art
- Flyway
- Liquibase
- Active Record (migrations)
- Play Evolutions
- DBEvolv (https://github.com/mnubo/dbevolv)
- Squitch (https://sqitch.org)
- Delta (https://delta.io)