12 months ago
Be very, very, very careful with this!
Run this from within ./script/console [development|test|staging]:
con = ActiveRecord::Base.connection
(con.tables-['schema_migrations', 'sessions']).each do |tbl| 
    con.execute "delete from #{tbl}"
end

This will remove ALL data from all tables from your database (besides the schema_migrations and sessions table).

You might as well just drop the whole database of course but then you'd have to re-create it and run all those migrations on it which can take an awful lot of time if your app is a little older...
comments
blog comments powered by Disqus