class CreateAuths
Generated by Authkit
.
Create an auths table for managing OAuth authentication.
Public Class Methods
down()
click to toggle source
# File lib/generators/authkit/templates/db/migrate/create_auths.rb, line 25 def self.down drop_table :auths end
up()
click to toggle source
# File lib/generators/authkit/templates/db/migrate/create_auths.rb, line 5 def self.up create_table :auths do |t| t.integer :user_id t.string :provider t.string :uid t.string :email t.boolean :verified_email t.string :token t.datetime :token_expires_at t.string :refresh_token t.string :secret_token t.text :env t.timestamps null: false end add_index :auths, :user_id add_index :auths, [:provider, :uid] end