16 lines
332 B
Ruby
16 lines
332 B
Ruby
|
class ProjectsUsers < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
create_table :projects_users, :id => false do |t|
|
||
|
t.integer :project_id
|
||
|
t.integer :user_id
|
||
|
t.foreign_key :projects
|
||
|
t.foreign_key :users
|
||
|
t.index :project_id, :user_id
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def self.down
|
||
|
drop_table :projects_users
|
||
|
end
|
||
|
end
|