summaryrefslogtreecommitdiff
path: root/config/initializers/fill_shards.rb
blob: cad662e12f3b2fe36eec1dbd23c250c4f7514c03 (plain)
1
2
3
4
5
# The `table_exists?` check is needed because during our migration rollback testing,
# `Shard.connected?` could be cached and return true even though the table doesn't exist
if Shard.connected? && Shard.table_exists? && !Gitlab::Database.read_only?
  Shard.populate!
end