summaryrefslogtreecommitdiff
path: root/config/initializers/fill_shards.rb
blob: e2889f595748e6b5e07c3003456d46983d1ffaa7 (plain)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

# The explicit schema version check is needed because during our migration rollback testing,
# `Shard.connected?` could be cached and return true even though the table doesn't exist
return unless Shard.connected?
return unless ActiveRecord::Migrator.current_version >= 20190402150158
return if Gitlab::Database.read_only?

Shard.populate!