cirandas.net

ref: master

db/migrate/070_add_updated_at_to_profiles.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class AddUpdatedAtToProfiles < ActiveRecord::Migration
  def self.up
    add_column :profiles, :updated_at, :datetime
    execute 'update profiles set updated_at = created_at'
  end

  def self.down
    remove_column :profiles, :updated_at
  end
end