Class: CreateUserProviders

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/authorizme/templates/migrations/2_create_user_providers.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/authorizme/templates/migrations/2_create_user_providers.rb', line 2

def change
  create_table :user_providers do |t|
    t.references :user
    t.integer :origin_user_id

    t.string :social_id
    t.string :provider_type
    t.string :token
    t.string :secret

    t.timestamps
  end
  # Indices
  change_table :user_providers do |t|
    t.index :user_id
    t.index :origin_user_id
    t.index :social_id
    t.index :provider_type
  end
end