CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
wheels dbmigrate info
Display database migration status and information.
Synopsis
wheels dbmigrate info
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
+-----------------------------------------+-----------------------------------------+
| Datasource: myApp | Total Migrations: 4 |
| Database Type: H2 | Available Migrations: 4 |
| | Current Version: 0 |
| | Latest Version: 20250812161449 |
+-----------------------------------------+-----------------------------------------+
+----------+------------------------------------------------------------------------+
| | 20250812161449_cli__create_reporting_procedures |
| | 20250812161302_cli__blacnk |
| | 20250812161250_cli__name |
| | 20250812154338_cli__0 |
+----------+------------------------------------------------------------------------+
Migration Files Location
Migrations are stored in /app/migrator/migrations/
and follow the naming convention:
[timestamp]_[description].cfc
Example:
20240125160000_create_users_table.cfc
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:
SELECT * FROM schema_migrations;
+----------------+
| version |
+----------------+
| 20240101100000 |
| 20240105150000 |
| 20240110090000 |
| 20240115120000 |
+----------------+
Use Cases
-
Check before deployment
wheels dbmigrate info
-
Verify after migration
wheels dbmigrate latest wheels dbmigrate info
-
Troubleshoot issues
- See which migrations have run
- Identify pending migrations
- Confirm database version
Troubleshooting
Migration Not Showing
- Check file is in
/app/migrator/migrations/
- Verify
.cfc
extension - Ensure proper timestamp format
Version Mismatch
- Check
schema_migrations
table - Verify 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:
#!/bin/bash
# Check migration status
wheels dbmigrate info
# Run if needed
if [[ $(wheels dbmigrate info | grep "pending") ]]; then
echo "Running pending migrations..."
wheels dbmigrate latest
fi
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