Class: SchemaPlus::ForeignKeys::Config

Inherits:
Valuable
  • Object
show all
Defined in:
lib/schema_plus/foreign_keys.rb

Overview

This global configuation options for SchemaPlus::ForeignKeys. Set them in config/initializers/schema_plus_foreign_keys.rb using:

SchemaPlus::ForeignKeys.setup do |config|
   ...
end

Instance Method Summary collapse

Instance Method Details

#merge(opts) ⇒ Object


55
56
57
# File 'lib/schema_plus/foreign_keys.rb', line 55

def merge(opts)
  dup.update_attributes(opts)
end

#on_deleteObject

:attr_accessor: on_delete

The default value for :on_delete when creating foreign key constraints for columns. Valid values are as described in ForeignKeyDefinition, or nil to let the database connection use its own default. Default is nil.


53
# File 'lib/schema_plus/foreign_keys.rb', line 53

has_value :on_delete

#on_updateObject

:attr_accessor: on_update

The default value for :on_update when creating foreign key constraints for columns. Valid values are as described in ForeignKeyDefinition, or nil to let the database connection use its own default. Default is nil.


44
# File 'lib/schema_plus/foreign_keys.rb', line 44

has_value :on_update