OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/modules/documents/db/migrate/20200217090016_document_tim...

12 lines
447 B

class DocumentTimestamps < ActiveRecord::Migration[6.0]
def change
add_column :documents, :updated_at, :datetime
rename_column :documents, :created_on, :created_at
# We do not need the timestamp on the data table, as we already have it on the journals table.
remove_column :document_journals, :created_on, :datetime
reversible do |change|
change.up { Document.update_all("updated_at = created_at") }
end
end
end