From af871a0623740f53a4dca5858b78efb35f0e32e0 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Mon, 19 Nov 2012 01:12:36 -0500 Subject: Make drop_table reversible [#8267] --- .../active_record/connection_adapters/abstract/schema_statements.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters/abstract') 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 -- cgit v1.2.3