DEV: Recompile theme fields after db:migrate

DEV: Recompile theme fields after db:migrate

diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index ea9bcfc..2b0f1af 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -35,6 +35,14 @@ end
 task 'db:migrate' => ['environment', 'set_locale'] do |_, args|
   SeedFu.seed(DiscoursePluginRegistry.seed_paths)
 
+  unless Discourse.skip_post_deployment_migrations?
+    puts
+    print "Recompiling theme fields... "
+    ThemeField.force_recompilation!
+    Theme.expire_site_cache!
+    puts "Done"
+  end
+
   if MultisiteTestHelpers.load_multisite?
     system("rake db:schema:dump")
     system("RAILS_DB=discourse_test_multisite rake db:schema:load")

GitHub sha: bc8b7b13

1 Like

DEV: Stop compiling themes during DB migration. Recompile on cdn change. (#7676)