Class: CreateProviderUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/omniauth/multiple_providers/install/templates/create_provider_users.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/generators/omniauth/multiple_providers/install/templates/create_provider_users.rb', line 2

def change
  create_table :provider_users do |t|
    t.integer :user_id
    t.string :email
    t.string :provider
    t.string :locale
    t.string :gender
    t.string :uid
    t.string :access_token
    t.string :refresh_token
    t.string :secret
    t.integer :expires_at
    t.string :nickname
    t.string :name
    t.string :image_path

    t.timestamps
  end

  add_index :provider_users, :user_id
  add_index :provider_users, :provider
  add_index :provider_users, :uid
end