scinote-web/db/migrate/20170803153030_add_user_identity_table.rb
zmagod 88d7429041 1. fixes failing unit and integration tests
2. fixes gem dependencies issues
3. fixes failing migrations
4. updates depricated factory_girl => factory_bot and fixes related issues

Signed-off-by: zmagod <zmago_devetak@yahoo.com>
2018-01-23 14:54:15 +01:00

13 lines
400 B
Ruby

class AddUserIdentityTable < ActiveRecord::Migration[4.2]
def change
create_table :user_identities do |t|
t.belongs_to :user, index: true
t.string :provider, null: false
t.string :uid, null: false
t.timestamps null: true
end
add_index :user_identities, %i(provider uid), unique: true
add_index :user_identities, %i(user_id provider), unique: true
end
end