Ruby on Rails - redo migrations in ruby on rails - ruby on rails tutorial - rails guides - rails tutorial - ruby rails
You can rollback and then migrate again using the redo command. This is basically a shortcut that combines rollback and migrate tasks. Run command:
rake db:migrate:redo3
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
rails db:migrate:redo
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
You can use the STEP parameter to go back more than one version. For example, to go back 3 migrations:
rake db:migrate:redo STEP=3
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
rails db:migrate:redo STEP=3