Class: ActiveRecord::Migration::Current

Inherits:
Migration
  • Object
show all
Defined in:
lib/active_record/migration.rb

Overview

This must be defined before the inherited hook, below

Direct Known Subclasses

Schema

Instance Method Summary collapse

Instance Method Details

#change_table(table_name, **options) ⇒ Object



588
589
590
591
592
593
594
# File 'lib/active_record/migration.rb', line 588

def change_table(table_name, **options)
  if block_given?
    super { |t| yield compatible_table_definition(t) }
  else
    super
  end
end

#compatible_table_definition(t) ⇒ Object



612
613
614
# File 'lib/active_record/migration.rb', line 612

def compatible_table_definition(t)
  t
end

#create_join_table(table_1, table_2, **options) ⇒ Object



596
597
598
599
600
601
602
# File 'lib/active_record/migration.rb', line 596

def create_join_table(table_1, table_2, **options)
  if block_given?
    super { |t| yield compatible_table_definition(t) }
  else
    super
  end
end

#create_table(table_name, **options) ⇒ Object

:nodoc:



580
581
582
583
584
585
586
# File 'lib/active_record/migration.rb', line 580

def create_table(table_name, **options)
  if block_given?
    super { |t| yield compatible_table_definition(t) }
  else
    super
  end
end

#drop_table(*table_names, **options) ⇒ Object



604
605
606
607
608
609
610
# File 'lib/active_record/migration.rb', line 604

def drop_table(*table_names, **options)
  if block_given?
    super { |t| yield compatible_table_definition(t) }
  else
    super
  end
end