2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-10-11 21:56:51 +01:00
|
|
|
class CreateAuthentications < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :authentications do |t|
|
|
|
|
t.references :user
|
|
|
|
t.string :provider
|
|
|
|
t.string :uid
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :authentications, :user_id
|
|
|
|
add_index :authentications, [:provider, :uid], :unique => true
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :authentications
|
|
|
|
end
|
|
|
|
end
|