I have a table that I created using the migrations, now I want to get rid of this table. I'm pretty sure I can just back out that migration, but I can't find the syntax to do that. I found this question from searching Rails DB Migration - How To Drop a Table?
but he basically says you can find what you need and provides a link. I read that link and I didn't see anything that says how to do it. I saw pieces of it, but I don't know how to put them together.
I see in the migration it has a self.down method, I really just need to know how to call that.
Try to create an empty migration and use:
drop_table :table_name
You can rollback the last migration with:
rake db:rollback
That will run the self.down
method, which should be drop_table :table_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With