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
recreate good_job migrations as empty files
ulferts8189aeb10c04
diff --git a/db/migrate/1000015_aggregated_migrations.rb b/db/migrate/1000015_aggregated_migrations.rbindex 3c26a15cafc..2bb9564d388 100644--- a/db/migrate/1000015_aggregated_migrations.rb+++ b/db/migrate/1000015_aggregated_migrations.rb@@ -350,13 +350,6 @@ class AggregatedMigrations < SquashedMigration20240104172050_add_project_queries20240115112549_fix_spent_time_widget_identifier20240116165933_add_derived_done_ratio_to_work_packages- 20240123151246_create_good_jobs- 20240123151247_create_good_job_settings- 20240123151248_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished- 20240123151249_create_good_job_batches- 20240123151250_create_good_job_executions- 20240123151251_create_good_jobs_error_event- 20240123151252_recreate_good_job_cron_indexes_with_conditional20240131130134_fix_inherited_group_memberships20240206173841_fix_untranslated_work_package_roles20240207075946_add_status_to_attachment@@ -364,10 +357,6 @@ class AggregatedMigrations < SquashedMigration20240222155909_rename_columns_on_project_queries20240227154544_remove_delayed_jobs20240306083241_change_default_value_of_alternative_color- 20240306154734_create_good_job_labels- 20240306154735_create_good_job_labels_index- 20240306154736_remove_good_job_active_id_index- 20240306154737_create_index_good_job_jobs_for_candidate_lookup20240206085104_remove_enums20240307094432_change_done_ratio_default_value_to_null20240307102541_reduce_configurable_design_variablesdiff --git a/db/migrate/20240123151246_create_good_jobs.rb b/db/migrate/20240123151246_create_good_jobs.rbnew file mode 100644index 00000000000..82cfd5305c5--- /dev/null+++ b/db/migrate/20240123151246_create_good_jobs.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class CreateGoodJobs < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240123151247_create_good_job_settings.rb b/db/migrate/20240123151247_create_good_job_settings.rbnew file mode 100644index 00000000000..886cb605e8e--- /dev/null+++ b/db/migrate/20240123151247_create_good_job_settings.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class CreateGoodJobSettings < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_job_settings.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240123151248_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rb b/db/migrate/20240123151248_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rbnew file mode 100644index 00000000000..e358f3abb23--- /dev/null+++ b/db/migrate/20240123151248_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class CreateIndexGoodJobsJobsOnPriorityCreatedAtWhenUnfinished < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240123151249_create_good_job_batches.rb b/db/migrate/20240123151249_create_good_job_batches.rbnew file mode 100644index 00000000000..b1e218a95c3--- /dev/null+++ b/db/migrate/20240123151249_create_good_job_batches.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class CreateGoodJobBatches < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_job_batches.rb and db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240123151250_create_good_job_executions.rb b/db/migrate/20240123151250_create_good_job_executions.rbnew file mode 100644index 00000000000..ea4ea91e1c3--- /dev/null+++ b/db/migrate/20240123151250_create_good_job_executions.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class CreateGoodJobExecutions < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_job_executions.rb and db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240123151251_create_good_jobs_error_event.rb b/db/migrate/20240123151251_create_good_jobs_error_event.rbnew file mode 100644index 00000000000..14ccb34375b--- /dev/null+++ b/db/migrate/20240123151251_create_good_jobs_error_event.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class CreateGoodJobsErrorEvent < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_job_executions.rb and db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240123151252_recreate_good_job_cron_indexes_with_conditional.rb b/db/migrate/20240123151252_recreate_good_job_cron_indexes_with_conditional.rbnew file mode 100644index 00000000000..54f003a0946--- /dev/null+++ b/db/migrate/20240123151252_recreate_good_job_cron_indexes_with_conditional.rb@@ -0,0 +1,8 @@+# frozen_string_literal: true++class RecreateGoodJobCronIndexesWithConditional < ActiveRecord::Migration[7.0]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240306154734_create_good_job_labels.rb b/db/migrate/20240306154734_create_good_job_labels.rbnew file mode 100644index 00000000000..2b5a0ac0ce6--- /dev/null+++ b/db/migrate/20240306154734_create_good_job_labels.rb@@ -0,0 +1,36 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class CreateGoodJobLabels < ActiveRecord::Migration[7.1]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240306154735_create_good_job_labels_index.rb b/db/migrate/20240306154735_create_good_job_labels_index.rbnew file mode 100644index 00000000000..a4e88f46152--- /dev/null+++ b/db/migrate/20240306154735_create_good_job_labels_index.rb@@ -0,0 +1,36 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class CreateGoodJobLabelsIndex < ActiveRecord::Migration[7.1]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240306154736_remove_good_job_active_id_index.rb b/db/migrate/20240306154736_remove_good_job_active_id_index.rbnew file mode 100644index 00000000000..0cbbf32822a--- /dev/null+++ b/db/migrate/20240306154736_remove_good_job_active_id_index.rb@@ -0,0 +1,36 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class RemoveGoodJobActiveIdIndex < ActiveRecord::Migration[7.1]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # This file is not squashed since good_job would otherwise recreate it when an update is done.+ end+enddiff --git a/db/migrate/20240306154737_create_index_good_job_jobs_for_candidate_lookup.rb b/db/migrate/20240306154737_create_index_good_job_jobs_for_candidate_lookup.rbnew file mode 100644index 00000000000..4276fb82f59--- /dev/null+++ b/db/migrate/20240306154737_create_index_good_job_jobs_for_candidate_lookup.rb@@ -0,0 +1,36 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class CreateIndexGoodJobJobsForCandidateLookup < ActiveRecord::Migration[7.1]+ def change+ # Moved to db/migrate/tables/good_jobs.rb+ # These files are not squashed since good_job will recreate them otherwise when an update is done.+ end+enddiff --git a/docs/development/migrations/README.md b/docs/development/migrations/README.mdindex a3ecc5b1e4b..94a01e8df5d 100644--- a/docs/development/migrations/README.md+++ b/docs/development/migrations/README.md@@ -56,3 +56,7 @@ To ensure that the squashing process hasn't introduced any schema changes, you c3. Perform the squashing process4. Run `rails db:drop db:create db:migrate` again to generate a new `structure.sql` file5. Compare the two structure files (e.g., using `diff`) - there should be no differences. This includes known shortcomings. The shortcomings could be addressed in separate migrations.++## Particularities++good_job creates migration files when it is upgraded. It does so simply by looking for the existence of migration files with expected names. Removing the files as it is done for other migrations would therefore only lead to the file being recreated with a different timestamp once good_job is upgraded. To prevent that from happening, good_job's migration files are not removed. But they are emptied out and their contents moved to `tables` classes just like it is done for squashed migrations.