diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-06-25 12:30:31 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-06-25 12:30:31 -0400 |
commit | 7e2e42379cb40a500eb8a236c05788eb3e84d141 (patch) | |
tree | 784dfe04f81b034889b96b5c251923da7e6f3a1e /db/migrate | |
parent | 275218aeaf24d4f9d58589cf68ec6647f0a65050 (diff) | |
download | thoughts-7e2e42379cb40a500eb8a236c05788eb3e84d141.tar.gz thoughts-7e2e42379cb40a500eb8a236c05788eb3e84d141.tar.bz2 thoughts-7e2e42379cb40a500eb8a236c05788eb3e84d141.zip |
Added logging in and logging out
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170625151955_devise_create_users.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/db/migrate/20170625151955_devise_create_users.rb b/db/migrate/20170625151955_devise_create_users.rb new file mode 100644 index 0000000..799f225 --- /dev/null +++ b/db/migrate/20170625151955_devise_create_users.rb | |||
@@ -0,0 +1,44 @@ | |||
1 | class DeviseCreateUsers < ActiveRecord::Migration[5.1] | ||
2 | def change | ||
3 | create_table :users do |t| | ||
4 | ## Database authenticatable | ||
5 | t.string :login, null: false, default: "" | ||
6 | t.string :email, null: false, default: "" | ||
7 | t.string :encrypted_password, null: false, default: "" | ||
8 | |||
9 | ## Recoverable | ||
10 | t.string :reset_password_token | ||
11 | t.datetime :reset_password_sent_at | ||
12 | |||
13 | ## Rememberable | ||
14 | t.datetime :remember_created_at | ||
15 | |||
16 | ## Trackable | ||
17 | t.integer :sign_in_count, default: 0, null: false | ||
18 | t.datetime :current_sign_in_at | ||
19 | t.datetime :last_sign_in_at | ||
20 | t.string :current_sign_in_ip | ||
21 | t.string :last_sign_in_ip | ||
22 | |||
23 | ## Confirmable | ||
24 | # t.string :confirmation_token | ||
25 | # t.datetime :confirmed_at | ||
26 | # t.datetime :confirmation_sent_at | ||
27 | # t.string :unconfirmed_email # Only if using reconfirmable | ||
28 | |||
29 | ## Lockable | ||
30 | # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts | ||
31 | # t.string :unlock_token # Only if unlock strategy is :email or :both | ||
32 | # t.datetime :locked_at | ||
33 | |||
34 | |||
35 | t.timestamps null: false | ||
36 | end | ||
37 | |||
38 | add_index :users, :login, unique: true | ||
39 | add_index :users, :email, unique: true | ||
40 | add_index :users, :reset_password_token, unique: true | ||
41 | # add_index :users, :confirmation_token, unique: true | ||
42 | # add_index :users, :unlock_token, unique: true | ||
43 | end | ||
44 | end | ||