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
Use execute over execute_sql.
Pavel Balashoufa67e0436dae
diff --git a/db/migrate/20201125121949_remove_renamed_cron_job.rb b/db/migrate/20201125121949_remove_renamed_cron_job.rbindex c2515075fc6..be642846ee2 100644--- a/db/migrate/20201125121949_remove_renamed_cron_job.rb+++ b/db/migrate/20201125121949_remove_renamed_cron_job.rb@@ -27,12 +27,10 @@#++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# and will cause 'uninitialized constant' errors.- execute_sql("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: Cron::ClearOldJobStatusJob%'")+ execute("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: Cron::ClearOldJobStatusJob%'")endenddiff --git a/db/migrate/20220804112533_remove_notification_cleanup_job.rb b/db/migrate/20220804112533_remove_notification_cleanup_job.rbindex f92ae07203c..5f64f6d455a 100644--- a/db/migrate/20220804112533_remove_notification_cleanup_job.rb+++ b/db/migrate/20220804112533_remove_notification_cleanup_job.rb@@ -27,10 +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%'")+ execute("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: Notifications::CleanupJob%'")Setting.where(name: 'notification_retention_period_days').delete_alldiff --git a/db/migrate/20230105073117_remove_renamed_date_alert_job.rb b/db/migrate/20230105073117_remove_renamed_date_alert_job.rbindex aec7f000008..e59bc347aa6 100644--- a/db/migrate/20230105073117_remove_renamed_date_alert_job.rb+++ b/db/migrate/20230105073117_remove_renamed_date_alert_job.rb@@ -27,11 +27,9 @@#++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.- execute_sql("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: Notifications::CreateDateAlertsNotificationsJob%'")+ execute("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: Notifications::CreateDateAlertsNotificationsJob%'")endenddiff --git a/modules/storages/db/migrate/20231009135807_remove_renamed_cronjobs.rb b/modules/storages/db/migrate/20231009135807_remove_renamed_cronjobs.rbindex 7454c8c893b..c6fe00093ae 100644--- a/modules/storages/db/migrate/20231009135807_remove_renamed_cronjobs.rb+++ b/modules/storages/db/migrate/20231009135807_remove_renamed_cronjobs.rb@@ -27,11 +27,9 @@#++class RemoveRenamedCronjobs < ActiveRecord::Migration[7.0]- include ::Migration::Utils-def up- execute_sql("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: CleanupUncontaineredFileLinksJob%'")- execute_sql("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: ManageNextcloudIntegrationJob%'")+ execute("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: CleanupUncontaineredFileLinksJob%'")+ execute("DELETE FROM delayed_jobs WHERE handler LIKE '%job_class: ManageNextcloudIntegrationJob%'")enddef down; end