From 0384b6d9101bbc67abcf747d33cbc0ab41b7f65a Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 23 Jun 2020 09:10:02 +0800 Subject: [PATCH] FIX: `multisite:migrate` failing to properly seed data. --- lib/tasks/db.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index 7b8facadc78..4e5469db407 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -151,10 +151,6 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do | execute_concurently(concurrency, exceptions) do |db| puts "Migrating #{db}" ActiveRecord::Tasks::DatabaseTasks.migrate - - if !Discourse.skip_post_deployment_migrations? && ENV['SKIP_OPTIMIZE_ICONS'] != '1' - SiteIconManager.ensure_optimized! - end end seed_paths = DiscoursePluginRegistry.seed_paths @@ -163,6 +159,10 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do | execute_concurently(concurrency, exceptions) do |db| puts "Seeding #{db}" SeedFu.seed(seed_paths) + + if !Discourse.skip_post_deployment_migrations? && ENV['SKIP_OPTIMIZE_ICONS'] != '1' + SiteIconManager.ensure_optimized! + end end $stdout = old_stdout