I would like to arbitrarily drop all tables in my Rails app via a Rake task.
This is for testing/staging purposes, and rolling back migrations doesn't seem appropriate/necessary here.
I've got to:
ActiveRecord::Base.connection.tables.each do |t|
puts "=== Deleting: #{t.to_s}"
drop_table t
end
But of course drop_table
is undefined in this context. How should I call it?