Class: SsoCreateUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/sso_client/install/templates/migration.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
# File 'lib/generators/sso_client/install/templates/migration.rb', line 2

def change
  create_table :users do | t |
    t.string  :uid            # omniauth[:uid]
    t.text    :name,          # omniauth[:info]
              :email,
              :nickname,
              :first_name,
              :last_name,
              :location,
              :description,
              :image,
              :phone,
              :urls
    t.text    :raw_info       # omniauth[:extra]
    t.trackable
    t.timestamps
  end

  add_index :users, :uid
end