wheels db version
Show the current database schema version.
Synopsis
Description
The wheels db version
command displays the current version of your database schema based on the last applied migration. This is useful for quickly checking which migration version your database is at.
Options
--detailed
Show additional information about the database state.
Examples
Basic Usage
Show current version:
Output:
Detailed Information
Output:
Understanding Versions
Version Format
Migrations use timestamp-based versions:
Format:
YYYYMMDDHHMMSS
Example:
20231203160000
= December 3, 2023 at 4:00:00 PM
No Version
If you see "No migrations have been applied yet":
Database is fresh with no migrations run
Run
wheels dbmigrate latest
to apply migrations
Common Use Cases
Quick Check
Before running migrations:
Deployment Verification
Troubleshooting
Compare versions across environments:
Related Information
The version corresponds to:
The latest migration file that has been applied
An entry in the migration tracking table
The current schema state of your database
Related Commands
wheels db status
- Show all migrations and their statuswheels dbmigrate latest
- Update to latest versionwheels db rollback
- Rollback to previous versionwheels dbmigrate info
- Detailed migration information
Last updated
Was this helpful?