Nicely written article, I wish I saw this just a fee days ago.
I am new in a rails world and I recently messed up my migrations, I didnt know that you have to migrate up on a specific migration version after doing a migration down.
Quick question, the irreversible on Active record, does that mean I can still rollback to previous versions?
What is the most recommended way of cleaning up issues with migrations especially when you have rolled back already?
Looking forward to more of these articles
"Some transformations are destructive in a manner that cannot be reversed. Migrations of that kind should raise an ActiveRecord::IrreversibleMigration exception in their down method."
But there is way you can reverse it????
you can reverse it by using "Reversible" , basically this method allow you to specify up and down behavior for part of the migration. so in Reversible part you can write your your own method
thanks for your comment , stay tuned for more interesting topic . if you want something that i cover on my ruby on rails blog then please do let me know . _^
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nicely written article, I wish I saw this just a fee days ago.
I am new in a rails world and I recently messed up my migrations, I didnt know that you have to migrate up on a specific migration version after doing a migration down.
Quick question, the irreversible on Active record, does that mean I can still rollback to previous versions?
What is the most recommended way of cleaning up issues with migrations especially when you have rolled back already?
Looking forward to more of these articles
in api.rubyonrails.org/classes/Active... website written:-
"Some transformations are destructive in a manner that cannot be reversed. Migrations of that kind should raise an ActiveRecord::IrreversibleMigration exception in their down method."
But there is way you can reverse it????
you can reverse it by using "Reversible" , basically this method allow you to specify up and down behavior for part of the migration. so in Reversible part you can write your your own method
thanks for your comment , stay tuned for more interesting topic . if you want something that i cover on my ruby on rails blog then please do let me know . _^