forked from ucberkeley/Beehive
-
Notifications
You must be signed in to change notification settings - Fork 3
/
20121202224402_devise_create_users.rb
31 lines (26 loc) · 1.04 KB
/
20121202224402_devise_create_users.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
change_table(:users) do |t|
# t.database_authenticatable :null => false
t.recoverable
t.rememberable
t.trackable
t.encryptable
# t.confirmable
# t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
# t.token_authenticatable
# Uncomment below if timestamps were not included in your original model.
# t.timestamps
end
add_index :users, :email, :unique => true
add_index :users, :reset_password_token, :unique => true
# add_index :users, :confirmation_token, :unique => true
# add_index :users, :unlock_token, :unique => true
# add_index :users, :authentication_token, :unique => true
end
def self.down
# By default, we don't want to make any assumption about how to roll back a migration when your
# model already existed. Please edit below which fields you would like to remove in this migration.
raise ActiveRecord::IrreversibleMigration
end
end