Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.76 KB | None | 0 0
  1. class DeviseCreateUsers < ActiveRecord::Migration
  2.   def self.up
  3.     create_table(:users) do |t|
  4.       t.database_authenticatable :null => false
  5.       t.recoverable
  6.       t.rememberable
  7.       t.trackable
  8.  
  9.       # t.encryptable
  10.       # t.confirmable
  11.       # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
  12.       # t.token_authenticatable
  13.  
  14.  
  15.       t.timestamps
  16.     end
  17.  
  18.     add_index :users, :email,                :unique => true
  19.     add_index :users, :reset_password_token, :unique => true
  20.     # add_index :users, :confirmation_token,   :unique => true
  21.     # add_index :users, :unlock_token,         :unique => true
  22.     # add_index :users, :authentication_token, :unique => true
  23.   end
  24.  
  25.   def self.down
  26.     drop_table :users
  27.   end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement