2013-04-17 03:08:21 -04:00
|
|
|
class GroupUsers < ActiveRecord::Migration
|
|
|
|
def change
|
2013-05-07 13:30:12 -04:00
|
|
|
create_table :group_users, force: true do |t|
|
2013-04-17 03:08:21 -04:00
|
|
|
t.integer :group_id, null: false
|
|
|
|
t.integer :user_id, null: false
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :group_users, [:group_id, :user_id], unique: true
|
|
|
|
end
|
|
|
|
end
|