Repository navigation
CLI Command Added
v1.3.0
Adds CLI-direct migrate commands against ./database/migrations, using the project's .env and bundled SQLite / Postgres / MySQL drivers. Depends on vormia-go v1.1.1+ (Migrator.Status).
Commands
| Command | Description |
|---|---|
vormia migrate |
Run all pending migrations |
vormia migrate:rollback |
Roll back the last batch (--steps=N optional) |
vormia migrate:reset |
Roll back all migrations |
vormia migrate:refresh |
Reset, then re-run all migrations |
vormia migrate:status |
Show applied vs pending |
vormia migrate:version |
Print the latest applied version |
Shared flag on each: --database=<name> (empty = DB_CONNECTION, else "default"). Named connections use DB_<NAME>_* env keys (e.g. DB_MYSQL2_DRIVER).
vormia migrate
vormia migrate --database=mysql2
vormia migrate:rollback --steps=1
vormia migrate:statusNotes
- Runs from a project root (requires
.vormia.json); migrations live indatabase/migrations/as<version>.up.sql/<version>.down.sql - Pure Go build (modernc SQLite — no cgo)
- Not in this release:
migrate:fresh,db:wipe,db:seed,db:fresh(needdb.Wipe+ a seeder model first)