Skip to content

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

Make execute_sql work.

Pavel Balashouf2ffac9e77b8
diff --git a/db/migrate/20201125121949_remove_renamed_cron_job.rb b/db/migrate/20201125121949_remove_renamed_cron_job.rb
index befb6701611..c2515075fc6 100644
--- a/db/migrate/20201125121949_remove_renamed_cron_job.rb
+++ b/db/migrate/20201125121949_remove_renamed_cron_job.rb
@@ -27,6 +27,8 @@
#++
class RemoveRenamedCronJob < ActiveRecord::Migration[6.0]
+ include ::Migration::Utils
+
def up
# The job has been renamed to JobStatus::Cron::ClearOldJobStatusJob
# the new job will be added on restarting the application but the old will still be in the database
diff --git a/db/migrate/20220804112533_remove_notification_cleanup_job.rb b/db/migrate/20220804112533_remove_notification_cleanup_job.rb
index f9f6cb6a7ec..f92ae07203c 100644
--- a/db/migrate/20220804112533_remove_notification_cleanup_job.rb
+++ b/db/migrate/20220804112533_remove_notification_cleanup_job.rb
@@ -27,6 +27,8 @@
#++
class RemoveNotificationCleanupJob < ActiveRecord::Migration[7.0]
+ include ::Migration::Utils
+
def up
execute_sql("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: Notifications::CleanupJob%'")
Setting
diff --git a/db/migrate/20230105073117_remove_renamed_date_alert_job.rb b/db/migrate/20230105073117_remove_renamed_date_alert_job.rb
index 1ba4f86c533..aec7f000008 100644
--- a/db/migrate/20230105073117_remove_renamed_date_alert_job.rb
+++ b/db/migrate/20230105073117_remove_renamed_date_alert_job.rb
@@ -27,6 +27,8 @@
#++
class RemoveRenamedDateAlertJob < ActiveRecord::Migration[6.0]
+ include ::Migration::Utils
+
def up
# The job has been renamed to Notifications::ScheduleDateAlertsNotificationsJob.
# The new job will be added on restarting the application.