Class: CreateClavisOauthIdentities

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/clavis/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/clavis/templates/migration.rb', line 4

def change
  create_table :clavis_oauth_identities do |t|
    t.references :authenticatable, polymorphic: true, null: false, index: true
    t.string :provider, null: false
    t.string :uid, null: false
    t.json :auth_data
    t.string :token
    t.string :refresh_token
    t.datetime :expires_at
    t.timestamps
    
    t.index [:provider, :uid], unique: true
  end
end