Ignore email migration when running settings table does not exist

pull/4351/head
Cyril Rohr 9 years ago committed by Oliver Günther
parent d5e0091093
commit 76e1fc13a9
  1. 4
      config/initializers/migrate_email_settings.rb

@ -1,6 +1,8 @@
OpenProject::Application.configure do
config.after_initialize do
unless Setting.email_delivery_migrated?
# settings table may not exist when you run db:migrate at installation
# time, so just ignore this block when that happens.
if Setting.settings_table_exists_yet? && !Setting.email_delivery_migrated?
Rails.logger.info "Migrating existing email settings to the settings table..."
OpenProject::Configuration.migrate_mailer_configuration!
end

Loading…
Cancel
Save