Class: CreateDeviseMultipleTokenAuthDevices

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/devise_multiple_token_auth/templates/migrations/create_devise_multiple_token_auth_devices.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
# File 'lib/generators/devise_multiple_token_auth/templates/migrations/create_devise_multiple_token_auth_devices.rb', line 2

def change
  create_table :devise_multiple_token_auth_devices do |t|
    t.belongs_to :user, index: true
    t.string :auth_token, null:false, index: {unique: true}
    t.datetime :expires_at
    t.timestamps null: false
  end
end