Skip to content

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 file
  • upgrade — Apply pending migrations to the database
  • rollback — Undo one or more migrations

📊 Status Commands

Commands to check the state of your migrations:

  • status — See applied and pending migrations
  • history — View complete migration history
  • current — Show the latest applied version

🔒 Lock Commands

Commands to manage migration locking:

  • lock-status — Check if the database is locked
  • unlock — Manually release the migration lock

🔧 Maintenance Commands

Commands to validate and fix migration issues:

Getting Help

Every command has a --help option:

jetbase --help           # General help
jetbase upgrade --help   # Help for upgrade command
jetbase rollback --help  # Help for rollback command