Commit cc8ba45b authored by Andreas Brandl's avatar Andreas Brandl
parent 1b06aa95
# The `table_exists?` check is needed because during our migration rollback testing,
# 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 Shard.table_exists?
return unless Shard.connection.index_exists?(:shards, :name, unique: true)
return unless ActiveRecord::Migrator.current_version >= 20190402150158
return if Gitlab::Database.read_only?
Shard.populate!
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment