A useful primer on how to use migration files in Craft.
Migrations are PHP files that contain code which alters the database from one state to another.
The core commands are as follows.
Run any waiting migrations, specifically the safeUp()
functions:
php craft up
Rerun the last migration (undoes the previous migration and runs the file(s) again, so any changes are automatically applied):
php craft migrate/redo --interactive=0
Revert the previous migration (runs the safeDown()
function):
php craft migrate/down --interactive=0