tracks/db/migrate/20110915100000_add_last_reviewed_to_project.rb

12 lines
302 B
Ruby
Raw Permalink Normal View History

2019-05-13 18:42:57 +02:00
class AddLastReviewedToProject < ActiveRecord::Migration[5.2]
2011-09-28 13:54:50 +02:00
def self.up
add_column :projects, :last_reviewed, :timestamp
2011-09-28 13:54:50 +02:00
execute 'UPDATE projects SET last_reviewed = created_at WHERE last_reviewed IS NULL'
end
2011-09-28 13:54:50 +02:00
def self.down
remove_column :projects, :last_reviewed
end
end