Sha256: 48e4e0267dd1fba5bee6443c521a56372247a770ab8e7553731879393c4409ed

Contents?: true

Size: 679 Bytes

Versions: 1

Compression:

Stored size: 679 Bytes

Contents

class CreateUnicoCreditorRepresentatives < ActiveRecord::Migration
  def change
    create_table :unico_creditor_representatives do |t|
      t.references :creditor
      t.references :representative_person
    end

    add_foreign_key :unico_creditor_representatives, :unico_creditors,
                    column: :creditor_id
    add_foreign_key :unico_creditor_representatives, :unico_people,
                    column: :representative_person_id

    add_index :unico_creditor_representatives, :creditor_id
    add_index :unico_creditor_representatives, :representative_person_id,
              name: :idx_unico_creditor_representatives_on_representative_person_id
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unico-training-7.8.0 db/migrate/20130705134815_create_unico_creditor_representatives.rb