Fixes for Rails 2 / Foreign Keys / Empty fixture directories #6

Merged
merged 1 commit into from Sep 19, 2011
Jump to file or symbol
Failed to load files and symbols.
+3 −1
Diff settings

Always

Just for now

@@ -54,7 +54,9 @@ def clean_out_old_data
end
def delete_tables
- tables.each { |t| ActiveRecord::Base.connection.delete(delete_sql % ActiveRecord::Base.connection.quote_table_name(t)) }
+ ActiveRecord::Base.connection.disable_referential_integrity do
+ tables.each { |t| ActiveRecord::Base.connection.delete(delete_sql % ActiveRecord::Base.connection.quote_table_name(t)) }
+ end
end
def delete_yml_files