class Convergence::ForeignKey

Attributes

from_columns[RW]
key_name[RW]
options[RW]
to_columns[RW]
to_table[RW]

Public Class Methods

new(key_name, from_columns, to_table, to_columns, options) click to toggle source
# File lib/convergence/foreign_key.rb, line 4
def initialize(key_name, from_columns, to_table, to_columns, options)
  @key_name = key_name
  @from_columns = [from_columns].flatten.map(&:to_s)
  @to_table = to_table.to_s
  @to_columns = [to_columns].flatten.map(&:to_s)
  @options = { name: @key_name }.merge(options)
end