Add table to store omniauth details for users.

This commit is contained in:
Ahmad Saleem 2017-08-25 00:40:38 +05:00
parent 3f50c0e02f
commit f73f0f91e1
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,5 @@
class OmniauthUser < ActiveRecord::Base
belongs_to :user
validates :user, presence: true
end

View File

@ -0,0 +1,12 @@
class CreateOmniauthUsers < ActiveRecord::Migration
def change
create_table :omniauth_users do |t|
t.string :provider
t.string :uid
t.string :email
t.references :user, index: true, foreign_key: true
t.timestamps null: false
end
end
end