Skip to content

Suppress the Gitlab Schemas Validation

Bojan Marjanovic requested to merge bmarjanovic-update-migration-helpers into master

What does this MR do and why?

While testing/running database migrations Gitlab::Database::Migration[2.0] with (rename_column_concurrently) the Gitlab::database::QueryAnalyzers::GitlabSchemasValidateConnection::CrossSchemaAccessError has been raised.

How to set up and validate locally

  1. Create a database migration with rename_column_concurrently
  2. Run the migrations
  3. Validate that migration is successful

Migration example

# frozen_string_literal: true

class RenameWebHooksServiceIdToIntegrationId < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  def up
    rename_column_concurrently :web_hooks, :service_id, :integration_id
  end

  def down
    undo_rename_column_concurrently :web_hooks, :service_id, :integration_id
  end
end

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #367254 (closed)

Edited by Bojan Marjanovic

Merge request reports