1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-05 16:24:21 +01:00
fab-manager/db/migrate/20150108082541_add_published_at_to_projects.rb

14 lines
288 B
Ruby
Raw Normal View History

2016-03-23 18:39:41 +01:00
class AddPublishedAtToProjects < ActiveRecord::Migration
def up
add_column :projects, :published_at, :datetime
Project.find_each do |p|
p.update_columns(published_at: p.updated_at)
end
end
def down
remove_column :projects, :published_at, :datetime
end
end