Commands Reference 🛠️¶
Jetbase provides a set of intuitive commands to manage your database migrations. This section covers all available commands and their options.
Quick Reference¶
| Command | Description |
|---|---|
init |
Initialize Jetbase in current directory |
new |
Create a new migration file |
upgrade |
Apply pending migrations |
rollback |
Undo migrations |
status |
Show migration status of all migration files (applied vs. pending) |
history |
Show migration history |
current |
Show latest version migrated |
lock-status |
Check if migrations are locked |
unlock |
Remove migration lock |
validate-checksums |
Verify migration file integrity |
validate-files |
Check for missing migration files |
fix |
Fix migration issues |
fix-files |
Fix missing migration files (same as validate-files --fix) |
fix-checksums |
Fix migration file checksums (same as validate-checksums --fix) |
Command Categories¶
🚀 Setup Commands¶
Commands to initialize and set up your migration environment:
init— Create the Jetbase directory structure
📝 Migration Commands¶
Commands to create and run migrations:
new— Generate a new migration fileupgrade— Apply pending migrations to the databaserollback— Undo one or more migrations
📊 Status Commands¶
Commands to check the state of your migrations:
status— See applied and pending migrationshistory— View complete migration historycurrent— Show the latest applied version
🔒 Lock Commands¶
Commands to manage migration locking:
lock-status— Check if the database is lockedunlock— Manually release the migration lock
🔧 Maintenance Commands¶
Commands to validate and fix migration issues:
validate-checksums— Check for modified migration filesvalidate-files— Check for missing filesfix— Automatically repair common issues
Getting Help¶
Every command has a --help option: