Class: ActiveRecord::ConnectionAdapters::OracleEnhanced::Table

Inherits:
Table
  • Object
show all
Defined in:
lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb

Instance Method Summary collapse

Instance Method Details

#foreign_key(to_table, options = {}) ⇒ Object



81
82
83
84
85
# File 'lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb', line 81

def foreign_key(to_table, options = {})
  ActiveSupport::Deprecation.warn "`foreign_key` option will be deprecated. Please use `references` option"
  to_table = to_table.to_s.pluralize if ActiveRecord::Base.pluralize_table_names
  @base.add_foreign_key(@name, to_table, options)
end

#remove_foreign_key(options = {}) ⇒ Object



87
88
89
90
# File 'lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb', line 87

def remove_foreign_key(options = {})
  ActiveSupport::Deprecation.warn "`remove_foreign_key` option will be deprecated. Please use `remove_references` option"
  @base.remove_foreign_key(@name, options)
end