diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-24 10:15:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-24 10:15:22 +0000 |
commit | 4cd22dcc5595f32519fbb43329e33106127c29b6 (patch) | |
tree | 8d8c35201924edfc5ab522e0193342390a94d212 /db/migrate/20151024082034_add_tokens_updated_on.rb | |
parent | a371c8d850a2d1941e34fcf908d549438fdf72df (diff) | |
download | redmine-4cd22dcc5595f32519fbb43329e33106127c29b6.tar.gz redmine-4cd22dcc5595f32519fbb43329e33106127c29b6.zip |
Keep track of valid user sessions (#21058).
git-svn-id: http://svn.redmine.org/redmine/trunk@14735 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20151024082034_add_tokens_updated_on.rb')
-rw-r--r-- | db/migrate/20151024082034_add_tokens_updated_on.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20151024082034_add_tokens_updated_on.rb b/db/migrate/20151024082034_add_tokens_updated_on.rb new file mode 100644 index 000000000..0af28dc81 --- /dev/null +++ b/db/migrate/20151024082034_add_tokens_updated_on.rb @@ -0,0 +1,10 @@ +class AddTokensUpdatedOn < ActiveRecord::Migration + def self.up + add_column :tokens, :updated_on, :timestamp + Token.update_all("updated_on = created_on") + end + + def self.down + remove_column :tokens, :updated_on + end +end |