Ruby on Rails: How can I revert a migration with rake db:migrate?

Run the following command

rake db:migrate:down VERSION=<version>

where <version> is the version number of your migration file you want to revert.

eg. if you want to revert a migration with file name 3846656238_create_users.rb

rake db:migrate:down VERSION=3846656238

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)