# 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.main.read_only?
Shard.populate!
-
Yorick Peterse authored
This module contained various methods that were forwarded to Gitlab::Database::Connection. This commit removes these wrappers in favour of using Gitlab::Database.main instead. This is done to make it explicit what database connection should be used. See https://gitlab.com/gitlab-org/gitlab/-/issues/331776 and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65262 for more information.
Unverified5fbebc21