Skip to content

Instantly share code, notes, and snippets.

@raldred
Created July 23, 2009 15:20
Show Gist options
  • Save raldred/153070 to your computer and use it in GitHub Desktop.
Save raldred/153070 to your computer and use it in GitHub Desktop.
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -187,7 +187,7 @@ module ActiveRecord
# Drops a table from the database.
def drop_table(table_name, options = {})
- execute "DROP TABLE #{quote_table_name(table_name)}"
+ execute "DROP#{' TEMPORARY' if options[:temporary]} TABLE #{quote_table_name(table_name)}"
end
# Adds a new column to the named table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment