Commit 6e59c54e authored by Kamil Trzciński's avatar Kamil Trzciński

Improvements after code-review

Change a few bits after code-review,
update comments, and names in specs
parent b7284d4f
......@@ -248,8 +248,6 @@ module Gitlab
def self.db_config_for_connection(connection)
return unless connection
# The LB connection proxy does not have a direct db_config
# that can be referenced
if connection.is_a?(::Gitlab::Database::LoadBalancing::ConnectionProxy)
return connection.load_balancer.configuration.primary_db_config
end
......
......@@ -25,10 +25,9 @@ module Gitlab
def migrate(direction)
if unmatched_schemas.any?
# TODO: This will fail running migration if we have two connections
# This will prevent future migrations from being run. Likely the best would
# be to ignore this type of migration.
# This is yet to be solved: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/73756/diffs#note_866211093
# TODO: Today skipping migration would raise an exception.
# Ideally, skipped migration should be ignored (not loaded), or softly ignored.
# Read more in: https://gitlab.com/gitlab-org/gitlab/-/issues/355014
raise MigrationSkippedError, "Current migration is skipped since it modifies "\
"'#{self.class.allowed_gitlab_schemas}' which is outside of '#{allowed_schemas_for_connection}'"
end
......
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