summaryrefslogtreecommitdiffstats
path: root/db/migrate/20151024082034_add_tokens_updated_on.rb
blob: 0af28dc81fd2cca0ff0d0a7595a32d952aea1905 (plain)
1
2
3
4
5
6
7
8
9
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