OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
improve performance of aggregate journals migration
ulfertsb3bd780c2c38
diff --git a/db/migrate/20210615150558_aggregate_journals.rb b/db/migrate/20210615150558_aggregate_journals.rbindex 46eccbfea53..b16e90ae020 100644--- a/db/migrate/20210615150558_aggregate_journals.rb+++ b/db/migrate/20210615150558_aggregate_journals.rb@@ -25,7 +25,7 @@ class AggregateJournals < ActiveRecord::Migration[6.1]# The change is irreversible (aggregated journals cannot be broken down) but down will not cause database inconsistencies.def aggregate_journals(klass)- klass.in_batches(of: 20) do |instances|+ klass.in_batches do |instances|# Instantiating is faster than calculating the aggregated journals multiple times.aggregated_journals = aggregated_journals_of(klass, instances).to_a