065_add_settings_updated_on.rb 246 Bytes
Newer Older
1
class AddSettingsUpdatedOn < ActiveRecord::Migration[4.2]
2 3 4
  def self.up
    add_column :settings, :updated_on, :timestamp
    # set updated_on
jplang's avatar
jplang committed
5
    Setting.all.each(&:save)
6 7 8 9 10 11
  end

  def self.down
    remove_column :settings, :updated_on
  end
end