Skip to content

Draft: Prepare indexes on taggings for bigint column conversions

Krasimir Angelov requested to merge 334823-taggings-indexes-async-creation into master

What does this MR do?

This MR enqueues async creation for indexes that will be needed to convert taggings to bigint - !66625 (diffs).

This is done to prevent the actual column swap migration running for an excessive length of time.

Database migrations

Up

$ bundle exec rails db:migrate:up VERSION=20210830052547
== 20210830052547 PrepareIndexesForTaggingsBigintConversion2: migrating =======
-- index_exists?(:taggings, :id_convert_to_bigint, {:where=>"taggable_type = 'Project'", :name=>:tmp_index_taggings_on_id_bigint_where_taggable_type_project, :algorithm=>:concurrently})
   -> 0.0033s
-- add_index_options(:taggings, :id_convert_to_bigint, {:where=>"taggable_type = 'Project'", :name=>:tmp_index_taggings_on_id_bigint_where_taggable_type_project, :algorithm=>:concurrently})
   -> 0.0000s
== 20210830052547 PrepareIndexesForTaggingsBigintConversion2: migrated (0.0189s) 

Down

$ bundle rails db:migrate:down VERSION=20210830052547
== 20210830052547 PrepareIndexesForTaggingsBigintConversion2: reverting =======
== 20210830052547 PrepareIndexesForTaggingsBigintConversion2: reverted (0.0120s) 

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #334823 (closed)

Merge request reports