- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0 (0)
- 3.2.1 (1)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (2)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (38)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (11)
- 6.1.3.1 (5)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (25)
- 7.1.3.4 (0)
- What's this?
Migration Command Recorder
+ActiveRecord::Migration::CommandRecorder+ records commands done during a migration and knows how to reverse those commands. The CommandRecorder knows how to invert the following commands:
- 
add_column 
- 
add_foreign_key 
- 
add_check_constraint 
- 
add_exclusion_constraint 
- 
add_unique_constraint 
- 
add_index 
- 
add_reference 
- 
add_timestamps 
- 
change_column_default (must supply a :from and :to option) 
- 
change_column_null 
- 
change_column_comment (must supply a :from and :to option) 
- 
change_table_comment (must supply a :from and :to option) 
- 
create_enum 
- 
create_join_table 
- 
create_table 
- 
disable_extension 
- 
drop_enum (must supply a list of values) 
- 
drop_join_table 
- 
drop_table (must supply a block) 
- 
enable_extension 
- 
remove_column (must supply a type) 
- 
remove_columns (must supply a :type option) 
- 
remove_foreign_key (must supply a second table) 
- 
remove_check_constraint 
- 
remove_exclusion_constraint 
- 
remove_unique_constraint 
- 
remove_index 
- 
remove_reference 
- 
remove_timestamps 
- 
rename_column 
- 
rename_enum (must supply a :to option) 
- 
rename_enum_value (must supply a :from and :to option) 
- 
rename_index 
- 
rename_table 
Constants
ReversibleAndIrreversibleMethods = [ :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_default, :add_reference, :remove_reference, :transaction, :drop_join_table, :drop_table, :execute_block, :enable_extension, :disable_extension, :change_column, :execute, :remove_columns, :change_column_null, :add_foreign_key, :remove_foreign_key, :change_column_comment, :change_table_comment, :add_check_constraint, :remove_check_constraint, :add_exclusion_constraint, :remove_exclusion_constraint, :add_unique_constraint, :remove_unique_constraint, :create_enum, :drop_enum, :rename_enum, :add_enum_value, :rename_enum_value, ]
Attributes
| [RW] | reverting | |
| [RW] | delegate | |
| [RW] | commands | 

 RSpec
RSpec Ruby on Rails
Ruby on Rails Ruby
Ruby 
   
   
   
    
 = protected
 = protected
    