=================================================================== --- tasks/database.rake (revision 32) +++ tasks/database.rake (working copy) @@ -31,6 +31,8 @@ desc("Removes all the data from the current environment's database, but does not drop the database itself.") task(:empty => :environment) do return unless destructive_tasks_allowed? + connection = ActiveRecord::Base.connection + sql = (/Oracle/ =~ connection.adapter_name) ? "TRUNCATE TABLE %s" : "TRUNCATE %s" tables.each do |table_name| - ActiveRecord::Base.connection.delete("TRUNCATE #{table_name}") + connection.delete(sql % table_name) end end