lib/generators/authkit/templates/db/migrate/create_auths.rb in authkit-0.5.0 vs lib/generators/authkit/templates/db/migrate/create_auths.rb in authkit-0.7.0

- old
+ new

@@ -1,9 +1,9 @@ # Generated by Authkit. # # Create an auths table for managing OAuth authentication. -class CreateAuths < ActiveRecord::Migration +class CreateAuths < ActiveRecord::Migration[5.0] def self.up create_table :auths do |t| t.integer :user_id t.string :provider t.string :uid @@ -12,11 +12,15 @@ t.string :token t.datetime :token_expires_at t.string :refresh_token t.string :secret_token t.text :env - t.timestamps + + t.timestamps null: false end + + add_index :auths, :user_id + add_index :auths, [:provider, :uid] end def self.down drop_table :auths end