Module: Gitlab::Database::MigrationHelpers::RestrictGitlabSchema

Extended by:
ActiveSupport::Concern
Included in:
Gitlab::Database::Migration::V2_0
Defined in:
lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb

Instance Method Summary collapse

Instance Method Details

#exec_migration(conn, direction) ⇒ Object


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb', line 24

def exec_migration(conn, direction)
  if unmatched_schemas.any?
    migration_skipped
    return
  end

  Gitlab::Database::QueryAnalyzer.instance.within([validator_class, connection_validator_class]) do
    validator_class.allowed_gitlab_schemas = self.allowed_gitlab_schemas

    super
  end
end