2019-02-20 18:51:55 -05:00
|
|
|
# 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?
|
2018-11-07 12:25:29 -05:00
|
|
|
Shard.populate!
|
|
|
|
end
|