Remove temp index from vulnerability_occurrences on id and scanner_id
What does this MR do and why?
Do not merge until the MigrateSharedVulnerabilityScanners
background migration has completed.
Addresses #368432 (closed)
Removes the temp index tmp_index_vulnerability_occurrences_on_id_and_scanner_id
that is created in !92329 (merged)
Migration Output
Up
bundle exec rake db:migrate:up:main VERSION=20220824082427
main: == 20220824082427 RemoveTmpIdxVulnerabilityOccurrencesOnIdAndScannerId: migrating
main: -- transaction_open?()
main: -> 0.0000s
main: -- indexes(:vulnerability_occurrences)
main: -> 0.0112s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0004s
main: -- remove_index(:vulnerability_occurrences, {:algorithm=>:concurrently, :name=>"tmp_index_vulnerability_occurrences_on_id_and_scanner_id"})
main: -> 0.0019s
main: -- execute("RESET statement_timeout")
main: -> 0.0004s
main: == 20220824082427 RemoveTmpIdxVulnerabilityOccurrencesOnIdAndScannerId: migrated (0.0225s)
Down
bundle exec rake db:migrate:down:main VERSION=20220824082427
main: == 20220824082427 RemoveTmpIdxVulnerabilityOccurrencesOnIdAndScannerId: reverting
main: -- transaction_open?()
main: -> 0.0000s
main: -- index_exists?(:vulnerability_occurrences, [:id, :scanner_id], {:where=>"report_type IN (7,99)", :name=>"tmp_index_vulnerability_occurrences_on_id_and_scanner_id", :algorithm=>:concurrently})
main: -> 0.0125s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0004s
main: -- add_index(:vulnerability_occurrences, [:id, :scanner_id], {:where=>"report_type IN (7,99)", :name=>"tmp_index_vulnerability_occurrences_on_id_and_scanner_id", :algorithm=>:concurrently})
main: -> 0.0076s
main: -- execute("RESET statement_timeout")
main: -> 0.0005s
main: == 20220824082427 RemoveTmpIdxVulnerabilityOccurrencesOnIdAndScannerId: reverted (0.0322s)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dominic Bauer