rosa-build/db/migrate/20111011200645_create_authe...

20 lines
408 B
Ruby
Raw Normal View History

2012-01-30 20:39:34 +00:00
# -*- encoding : utf-8 -*-
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