Commit 45235f88 authored by Tiger Watson's avatar Tiger Watson

Merge branch '346100-cleanup-after-dropinvalidsecurityfindings-background-migration' into 'master'

Cleanup after DropInvalidSecurityFindings migration

See merge request gitlab-org/gitlab!75134
parents f6185c2b f8059937
# frozen_string_literal: true
class CleanupAfterDropInvalidSecurityFindings < Gitlab::Database::Migration[1.0]
MIGRATION = "DropInvalidSecurityFindings"
INDEX_NAME = "tmp_index_uuid_is_null"
disable_ddl_transaction!
def up
# Make sure all jobs scheduled by
# db/post_migrate/20211110151350_schedule_drop_invalid_security_findings.rb
# are finished
finalize_background_migration(MIGRATION)
# Created by db/post_migrate/20211110151320_add_temporary_index_on_security_findings_uuid.rb
remove_concurrent_index_by_name :security_findings, INDEX_NAME
end
def down
add_concurrent_index(
:security_findings,
:id,
where: "uuid IS NULL",
name: INDEX_NAME
)
end
end
46767d804bde08ad4a076f20436652f980eb935a79b2ad30b4735b956be69a7a
\ No newline at end of file
......@@ -27982,8 +27982,6 @@ CREATE UNIQUE INDEX tmp_index_on_tmp_project_id_on_namespaces ON namespaces USIN
CREATE INDEX tmp_index_on_vulnerabilities_non_dismissed ON vulnerabilities USING btree (id) WHERE (state <> 2);
CREATE INDEX tmp_index_uuid_is_null ON security_findings USING btree (id) WHERE (uuid IS NULL);
CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name);
CREATE UNIQUE INDEX uniq_pkgs_deb_grp_components_on_distribution_id_and_name ON packages_debian_group_components USING btree (distribution_id, name);
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