15 lines
325 B
Ruby
15 lines
325 B
Ruby
|
|
class CreateContactsContracts < ActiveRecord::Migration
|
||
|
|
def self.up
|
||
|
|
create_table :contacts_contracts, :id => false do |t|
|
||
|
|
t.integer :contract_id
|
||
|
|
t.integer :contact_id
|
||
|
|
end
|
||
|
|
add_index :contacts_contracts, [:contract_id, :contact_id]
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
def self.down
|
||
|
|
drop_table :contacts_contracts
|
||
|
|
end
|
||
|
|
end
|