wheels dbmigrate

Create new migration files and migrate your database

The wheels dbmigrate set of commands (also available as an alias of wheels db allow you to migrate your database up, down, back to "zero" or to the latest version. You can also create migration CFC files which live in /db/migrate/.

Sub Commands

Migrate up and Down Versions:

wheels db latest - migrate to the latest version

wheels db up - migrate one version up

wheels db down - migrate one version down

wheels db exec [version] - migrate to a specific version number

Create Migration Files

wheels db create [x] - create "Create" migration file from template

wheels db remove [x] - create "Remove" migration file from template

The options for the above create/remove [x] are:

  • blank
  • column
  • table

If you choose option "column", then the value of "Enter name:" asked in the CLI is the table name, the column name must be entered manually in the created migration file.


wheels db info - get database information from wheels