Command Line Tools
dbmigrate up
dbmigrate up
Section titled “dbmigrate up”Run the next pending database migration.
Synopsis
Section titled “Synopsis”wheels dbmigrate upAlias: wheels db up
Description
Section titled “Description”The dbmigrate up command executes the next pending migration in your database migration queue. This command is used to incrementally apply database changes one migration at a time, allowing for controlled and reversible database schema updates.
Parameters
Section titled “Parameters”None.
Examples
Section titled “Examples”Run the next pending migration
Section titled “Run the next pending migration”wheels dbmigrate upThis will execute the next migration in the sequence and update the database schema version.
Use Cases
Section titled “Use Cases”Incremental Database Updates
Section titled “Incremental Database Updates”When you want to apply database changes one at a time rather than all at once:
# Check pending migrationswheels dbmigrate info
# Apply next migrationwheels dbmigrate up
# Verify the changewheels dbmigrate infoControlled Migration Application
Section titled “Controlled Migration Application”Apply migrations one at a time for better control:
# Check current statuswheels dbmigrate info
# Apply next migrationwheels dbmigrate up
# Verify the change was appliedwheels dbmigrate info- Migrations are executed in chronological order based on their timestamps
- Each migration is tracked in the database to prevent duplicate execution
- If already at latest version, displays: “We’re all up to date already!”
- If no more versions available, displays: “No more versions to go to?”
- Automatically runs
dbmigrate infoafter successful migration - Always backup your database before running migrations in production
Related Commands
Section titled “Related Commands”wheels dbmigrate down- Rollback the last migrationwheels dbmigrate latest- Run all pending migrationswheels dbmigrate info- View migration statuswheels dbmigrate reset- Reset all migrations