2019-09-04 21:01:54 +05:30
|
|
|
# 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-12-13 13:39:08 +05:30
|
|
|
Shard.populate!
|
|
|
|
end
|