committed 04:06AM - 06 Nov 24 UTC
After data seed, we should reset Redis cache to ensure that the correct flags ar…e cached.
However, `db:create` is skipping Redis
https://github.com/discourse/discourse/blob/main/lib/tasks/db.rake#L39
And uses `ActiveSupport::Cache::MemoryStore.new`
https://github.com/discourse/discourse/blob/e2292d4c5914875ad0e303770c56db7cc96847e3/lib/discourse.rb#L523
Therefore, the reset flags cache was moved to initializers and evaluated only when the cache is Redis and Flags table already exists.
Meta: https://meta.discourse.org/t/development-install-fails-when-running-bin-rails-db-migrate/332754