mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Add table to store omniauth details for users.
This commit is contained in:
parent
3f50c0e02f
commit
f73f0f91e1
5
app/models/omniauth_user.rb
Normal file
5
app/models/omniauth_user.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class OmniauthUser < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
|
||||
validates :user, presence: true
|
||||
end
|
||||
12
db/migrate/20170824183110_create_omniauth_users.rb
Normal file
12
db/migrate/20170824183110_create_omniauth_users.rb
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user