DEV: Add skip seed flag (#10116)

DEV: Add skip seed flag (#10116)

  • add a flag to skip seed

  • only seed when running post deployment migrations

diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index 4e5469d..e6096e8 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -157,11 +157,13 @@ task 'multisite:migrate' => ['db:load_config', 'environment', 'set_locale'] do |
   SeedFu.seed(seed_paths, /001_refresh/)
 
   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!
+      if ENV['SKIP_SEED'] != '1'
+        puts "Seeding #{db}"
+        SeedFu.seed(seed_paths)
+      end
     end
   end
 

GitHub sha: 01b6349a

1 Like

This commit appears in #10116 which was merged by blake.