To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / db / migrate / 20090704172355_create_groups_users.rb @ 441:cbce1fd3b1b7
History | View | Annotate | Download (383 Bytes)
| 1 |
class CreateGroupsUsers < ActiveRecord::Migration |
|---|---|
| 2 |
def self.up |
| 3 |
create_table :groups_users, :id => false do |t| |
| 4 |
t.column :group_id, :integer, :null => false |
| 5 |
t.column :user_id, :integer, :null => false |
| 6 |
end
|
| 7 |
add_index :groups_users, [:group_id, :user_id], :unique => true, :name => :groups_users_ids |
| 8 |
end
|
| 9 |
|
| 10 |
def self.down |
| 11 |
drop_table :groups_users
|
| 12 |
end
|
| 13 |
end
|