wheels dbmigrate info
Display database migration status and information.
Synopsis
Alias: wheels db info
Description
The wheels dbmigrate info
command shows the current state of database migrations, including which migrations have been run, which are pending, and the current database version.
Parameters
None.
Output
The command displays:
Datasource: The database connection being used
Database Type: The type of database (MySQL, PostgreSQL, etc.)
Total Migrations: Count of all migration files found
Available Migrations: Number of pending migrations
Current Version: The latest migration that has been run
Latest Version: The newest migration available
Migration List: All migrations with their status (migrated or pending)
Example Output
Migration Files Location
Migrations are stored in /app/migrator/migrations/
and follow the naming convention:
Example:
Understanding Version Numbers
Version numbers are timestamps in format:
YYYYMMDDHHmmss
Higher numbers are newer migrations
Migrations run in chronological order
Database Schema Table
Migration status is tracked in schema_migrations
table:
Use Cases
Check before deployment
Verify after migration
Troubleshoot issues
See which migrations have run
Identify pending migrations
Confirm database version
Common Scenarios
All Migrations Complete
Fresh Database
Partial Migration
Troubleshooting
Migration Not Showing
Check file is in
/app/migrator/migrations/
Verify
.cfc
extensionEnsure proper timestamp format
Version Mismatch
Check
schema_migrations
tableVerify migration files haven't been renamed
Look for duplicate timestamps
Connection Issues
Verify datasource configuration
Check database credentials
Ensure database server is running
Integration with CI/CD
Use in deployment scripts:
Best Practices
Always check info before running migrations
Review pending migrations before deployment
Keep migration files in version control
Don't modify completed migration files
Use info to verify production deployments
See Also
wheels dbmigrate latest - Run all pending migrations
wheels dbmigrate up - Run next migration
wheels dbmigrate down - Rollback migration
wheels dbmigrate create blank - Create new migration
Last updated
Was this helpful?