Module: Foreigner::ConnectionAdapters::TableDefinition::InstanceMethods
- Defined in:
- lib/foreigner/connection_adapters/abstract/schema_definitions.rb
Instance Method Summary collapse
Instance Method Details
#foreign_key(to_table, options = {}) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/foreigner/connection_adapters/abstract/schema_definitions.rb', line 39 def foreign_key(to_table, = {}) ActiveSupport::Deprecation.warn( 'adding a foreign key inside create_table is deprecated. ' + 'to add a foreign key, use add_foreign_key', caller[0,10] ) end |
#references_with_foreign_keys(*args) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/foreigner/connection_adapters/abstract/schema_definitions.rb', line 27 def references_with_foreign_keys(*args) = args. if [:foreign_key].present? ActiveSupport::Deprecation.warn( ':foreign_key option is deprecated inside create_table. ' + 'to add a foreign key, use add_foreign_key', caller[0,10] ) end references_without_foreign_keys(*(args << )) end |