Prepare async indexes for ci table int8 swaps
What does this MR do?
See #325617 (closed) and #325619 (closed)
Migration up
$ rails db:migrate:up VERSION=20210824174615
== 20210824174615 PrepareCiBuildsMetadataAndCiBuildAsyncIndexes: migrating ====
-- index_exists?(:ci_builds_metadata, :id_convert_to_bigint, {:unique=>true, :name=>:index_ci_builds_metadata_on_id_convert_to_bigint, :algorithm=>:concurrently})
-> 0.0030s
-- add_index_options(:ci_builds_metadata, :id_convert_to_bigint, {:unique=>true, :name=>:index_ci_builds_metadata_on_id_convert_to_bigint, :algorithm=>:concurrently})
-> 0.0000s
-- index_exists?(:ci_builds_metadata, :build_id_convert_to_bigint, {:unique=>true, :name=>:index_ci_builds_metadata_on_build_id_convert_to_bigint, :algorithm=>:concurrently})
-> 0.0020s
-- add_index_options(:ci_builds_metadata, :build_id_convert_to_bigint, {:unique=>true, :name=>:index_ci_builds_metadata_on_build_id_convert_to_bigint, :algorithm=>:concurrently})
-> 0.0000s
-- index_exists?(:ci_builds_metadata, :build_id_convert_to_bigint, {:where=>"has_exposed_artifacts IS TRUE", :name=>:index_ci_builds_metadata_on_build_id_int8_and_exposed_artifacts, :algorithm=>:concurrently})
-> 0.0017s
-- add_index_options(:ci_builds_metadata, :build_id_convert_to_bigint, {:where=>"has_exposed_artifacts IS TRUE", :name=>:index_ci_builds_metadata_on_build_id_int8_and_exposed_artifacts, :algorithm=>:concurrently})
-> 0.0000s
-- index_name_exists?(:ci_builds_metadata, :index_ci_builds_metadata_on_build_id_int8_where_interruptible)
-> 0.0007s
-- index_exists?(:ci_builds, :id_convert_to_bigint, {:unique=>true, :name=>:index_ci_builds_on_converted_id, :algorithm=>:concurrently})
-> 0.0084s
-- add_index_options(:ci_builds, :id_convert_to_bigint, {:unique=>true, :name=>:index_ci_builds_on_converted_id, :algorithm=>:concurrently})
-> 0.0000s
== 20210824174615 PrepareCiBuildsMetadataAndCiBuildAsyncIndexes: migrated (0.0578s)
Migration down
$ rails db:migrate:down VERSION=20210824174615
== 20210824174615 PrepareCiBuildsMetadataAndCiBuildAsyncIndexes: reverting ====
== 20210824174615 PrepareCiBuildsMetadataAndCiBuildAsyncIndexes: reverted (0.0186s)
Screenshots or Screencasts (strongly suggested)
How to setup and validate locally (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Edited by Patrick Bair