Permalink
Cannot retrieve contributors at this time
13 lines (12 sloc)
358 Bytes
|
class CreateRelationships < ActiveRecord::Migration |
|
def change |
|
create_table :relationships do |t| |
|
t.integer :follower_id |
|
t.integer :followed_id |
|
|
|
t.timestamps |
|
end |
|
add_index :relationships, :follower_id |
|
add_index :relationships, :followed_id |
|
add_index :relationships, [:follower_id, :followed_id], unique: true |
|
end |
|
end |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.