This is a rails question about migration versions
So i have a few migrations already existing. i.e. in my db/migrate/ folder i have some files like this:
- 1_add_products.rb
- 2_add_customers.rb
- 3_add_addresses.rb
- 4_add_tags.rb
and i've ran "rake db:migrate" so the current version is 4. I want to go back to version 2 permanently and start branching from there. So i did "rake db:migrate VERSION=2" and this reverted the changes correctly to reflect version 2. However, whenever i run "rake db:migrate" now, it runs all 4 of the migrations and puts me back at version 4.
Is there a way to permanently go back to one revision and then start branching newly from there? Can i just simply delete migration 3 & 4 after i roll back to version 2 ??
The reason I ask is because after i roll back to version 2, i need to add new migrations and run "rake db:migrate" and i definitely do not want migration 3 and migration 4 to be included.