mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
16 lines
323 B
Ruby
16 lines
323 B
Ruby
# frozen_string_literal:true
|
|
|
|
class AddPublishedAtToProjects < ActiveRecord::Migration[4.2]
|
|
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
|