aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2012-11-19 01:12:36 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2012-12-21 13:54:52 -0500
commitaf871a0623740f53a4dca5858b78efb35f0e32e0 (patch)
treee8a1f4983b6654a792bdcd93348ee2d3df84d850 /activerecord/lib/active_record/connection_adapters/abstract
parentbd155d2ae31a1e4c19274cfef6049d66136fd0cd (diff)
downloadrails-af871a0623740f53a4dca5858b78efb35f0e32e0.tar.gz
rails-af871a0623740f53a4dca5858b78efb35f0e32e0.tar.bz2
rails-af871a0623740f53a4dca5858b78efb35f0e32e0.zip
Make drop_table reversible [#8267]
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index bf3155e4e2..a2feb04b77 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -305,6 +305,10 @@ module ActiveRecord
end
# Drops a table from the database.
+ #
+ # Although this command ignores +options+ and the block if one is given, it can be helpful
+ # to provide these in a migration's +change+ method so it can be reverted.
+ # In that case, +options+ and the block will be used by create_table.
def drop_table(table_name, options = {})
execute "DROP TABLE #{quote_table_name(table_name)}"
end