aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration/command_recorder.rb
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2012-12-19 01:44:42 -0500
committerMarc-Andre Lafortune <github@marc-andre.ca>2012-12-21 13:54:53 -0500
commit06c7ba881d008be82d62656f297d6a3c09a889c5 (patch)
tree4ba289448374c19fd06126fcd430f9606e836a97 /activerecord/lib/active_record/migration/command_recorder.rb
parente43e8e268f0522f9f11f4eacae1d04afca768c9b (diff)
downloadrails-06c7ba881d008be82d62656f297d6a3c09a889c5.tar.gz
rails-06c7ba881d008be82d62656f297d6a3c09a889c5.tar.bz2
rails-06c7ba881d008be82d62656f297d6a3c09a889c5.zip
Make execute, change_column and remove_columns methods actually irreversible
[#8267]
Diffstat (limited to 'activerecord/lib/active_record/migration/command_recorder.rb')
-rw-r--r--activerecord/lib/active_record/migration/command_recorder.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb
index f738c909bc..13ce28330a 100644
--- a/activerecord/lib/active_record/migration/command_recorder.rb
+++ b/activerecord/lib/active_record/migration/command_recorder.rb
@@ -73,7 +73,8 @@ module ActiveRecord
[:create_table, :create_join_table, :rename_table, :add_column, :remove_column,
:rename_index, :rename_column, :add_index, :remove_index, :add_timestamps, :remove_timestamps,
:change_column, :change_column_default, :add_reference, :remove_reference, :transaction,
- :drop_join_table, :drop_table, :remove_columns, :remove_index,
+ :drop_join_table, :drop_table, :remove_index,
+ :change_column, :execute, :remove_columns, # irreversible methods need to be here too
].each do |method|
class_eval <<-EOV, __FILE__, __LINE__ + 1
def #{method}(*args, &block) # def create_table(*args, &block)