summaryrefslogtreecommitdiff
path: root/db/migrate/20140304043658_add_remember_token_to_users.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20140304043658_add_remember_token_to_users.rb')
-rw-r--r--db/migrate/20140304043658_add_remember_token_to_users.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20140304043658_add_remember_token_to_users.rb b/db/migrate/20140304043658_add_remember_token_to_users.rb
new file mode 100644
index 0000000..6d84942
--- /dev/null
+++ b/db/migrate/20140304043658_add_remember_token_to_users.rb
@@ -0,0 +1,8 @@
+class AddRememberTokenToUsers < ActiveRecord::Migration
+ #add a remember me token to the database
+ #this keeps a user signed in until they sign out
+ def change
+ add_column :users, :remember_token, :string
+ add_index :users, :remember_token
+ end
+end