Module: ActiveRecord::ConnectionAdapters::SchemaStatements

Defined in:
lib/activerecord-native_db_types_override/patches.rb

Instance Method Summary collapse

Instance Method Details

#add_reference(table_name, ref_name, options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/activerecord-native_db_types_override/patches.rb', line 6

def add_reference(table_name, ref_name, options = {})
  if ::NativeDbTypesOverride.migrations_options
    add_ref_opts = ::NativeDbTypesOverride.migrations_options[:add_reference]
    options = Marshal.load(Marshal.dump(add_ref_opts)).merge(options) if add_ref_opts
  end

  add_reference_without_native_db_types_override(table_name, ref_name, options)
end

#add_reference_without_native_db_types_overrideObject



4
# File 'lib/activerecord-native_db_types_override/patches.rb', line 4

alias_method :add_reference_without_native_db_types_override, :add_reference