I have a bunch of rails models that i\'m re-writing into a single model to simplify my code and reduce unnecessary tables.
I\'m wondering what the best way to delete a
All in one solution.
Run the following commands:
rails destroy model ModelName
rails g migration DropTableModelName
The former will generate a new migration file which should looks like this:
class DropTableModelName < ActiveRecord::Migration
def change
drop_table :model_name
end
end
Now run db:migrate
and you're done.