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

skip 12.0 update mail on newly created instance

ulfertsa76a968c48ab
diff --git a/db/migrate/20211105142202_queue_notification_update_mail.rb b/db/migrate/20211105142202_queue_notification_update_mail.rb
index 52c9c949a64..d5740abf0bd 100644
--- a/db/migrate/20211105142202_queue_notification_update_mail.rb
+++ b/db/migrate/20211105142202_queue_notification_update_mail.rb
@@ -1,5 +1,9 @@
class QueueNotificationUpdateMail < ActiveRecord::Migration[6.1]
def up
+ # On a newly created database, we don't want the update mail to be sent.
+ # Users are only created upon seeding.
+ return unless User.exists?
+
::Announcements::SchedulerJob
.perform_later subject: :'notifications.update_info_mail.subject',
body: :'notifications.update_info_mail.body',