diff --git a/config/initializers/100-flags.rb b/config/initializers/100-flags.rb index 4ba3954f0a4..17311b5190e 100644 --- a/config/initializers/100-flags.rb +++ b/config/initializers/100-flags.rb @@ -2,7 +2,8 @@ # On initialize, reset flags cache Rails.application.config.to_prepare do - if Discourse.cache.is_a?(Cache) && ActiveRecord::Base.connection.table_exists?(:flags) + if Discourse.cache.is_a?(Cache) && + !ActiveRecord::Base.connection.migration_context.needs_migration? Flag.reset_flag_settings! end end