shiva migrate
Run, roll back, and inspect database migrations.
Usage
bash
shiva migrate [options]Commands
Run all pending migrations
bash
shiva migrateCheck status
bash
shiva migrate --statusOutput:
Module Migration Status
shiva-player 001_create_players ✓ ran (2024-01-15)
shiva-player 002_add_metadata ✓ ran (2024-01-15)
shiva-economy 001_create_accounts ✓ ran (2024-01-15)
my-fishing 001_create_fishing_logs ⏳ pendingRoll back last batch
bash
shiva migrate --rollbackRoll back N steps
bash
shiva migrate --rollback --steps 3Run for one module only
bash
shiva migrate --module my-fishingReset all migrations (destructive!)
bash
shiva migrate --reset --forceOptions
| Flag | Description |
|---|---|
--status | Show migration status |
--rollback | Roll back last batch |
--steps N | Number of steps to roll back |
--module <name> | Run for a specific module only |
--destructive | Allow destructive operations (DROP, etc.) |
--reset | Roll back all migrations |
--force | Skip confirmation prompt |
--dry-run | Print SQL without executing |