Class: ActiveRecord::Migration::Current
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- ActiveRecord::Migration::Current
- Defined in:
- lib/active_record/migration.rb
Overview
This must be defined before the inherited hook, below
Direct Known Subclasses
Constant Summary
Constants inherited from ActiveRecord::Migration
Instance Attribute Summary
Attributes inherited from ActiveRecord::Migration
Instance Method Summary collapse
- #change_table(table_name, **options) ⇒ Object
- #compatible_table_definition(t) ⇒ Object
- #create_join_table(table_1, table_2, **options) ⇒ Object
-
#create_table(table_name, **options) ⇒ Object
:nodoc:.
- #drop_table(table_name, **options) ⇒ Object
Methods inherited from ActiveRecord::Migration
[], #announce, check_all_pending!, check_pending_migrations, #connection, #connection_pool, #copy, current_version, #disable_ddl_transaction, disable_ddl_transaction!, #down, #exec_migration, #execution_strategy, inherited, #initialize, load_schema_if_pending!, maintain_test_schema!, method_missing, #method_missing, migrate, #migrate, nearest_delegate, #next_migration_number, #proper_table_name, #reversible, #revert, #reverting?, #run, #say, #say_with_time, #suppress_messages, #table_name_options, #up, #up_only, valid_version_format?, #verbose, #write
Constructor Details
This class inherits a constructor from ActiveRecord::Migration
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveRecord::Migration
Instance Method Details
#change_table(table_name, **options) ⇒ Object
591 592 593 594 595 596 597 |
# File 'lib/active_record/migration.rb', line 591 def change_table(table_name, **) if block_given? super { |t| yield compatible_table_definition(t) } else super end end |
#compatible_table_definition(t) ⇒ Object
615 616 617 |
# File 'lib/active_record/migration.rb', line 615 def compatible_table_definition(t) t end |
#create_join_table(table_1, table_2, **options) ⇒ Object
599 600 601 602 603 604 605 |
# File 'lib/active_record/migration.rb', line 599 def create_join_table(table_1, table_2, **) if block_given? super { |t| yield compatible_table_definition(t) } else super end end |
#create_table(table_name, **options) ⇒ Object
:nodoc:
583 584 585 586 587 588 589 |
# File 'lib/active_record/migration.rb', line 583 def create_table(table_name, **) if block_given? super { |t| yield compatible_table_definition(t) } else super end end |
#drop_table(table_name, **options) ⇒ Object
607 608 609 610 611 612 613 |
# File 'lib/active_record/migration.rb', line 607 def drop_table(table_name, **) if block_given? super { |t| yield compatible_table_definition(t) } else super end end |