Summary of rake database migration commands in development

Public, Command Line, Databases

plawler

Created: Nov 15, 2014     Updated: Nov 16, 2014


$ rake db:migrate
$ rake db:migrate VERSION=0 --> Removes all migrations, resetting back to ground zero
$ rake db:migrate VERSION=20141013165213 --> Migrates back down to the specific named migration
$ rake db:migrate:status --> Provides a list of every migration, indicating if each one is up or down
$ rake db:migrate:up VERSION=20141013165213 --> Migrates the specific named migration to the 'up' status
$ rake db:migrate:down VERSION=20141013165213 --> Migrates the specific named migration to the 'down' status
$ rake db:migrate:redo VERSION=20141013165213 --> Migrates the specific named migration 'down' and then 'up'