Skip to content

Remove redundant indexes from CI variables

Tiger Watson requested to merge remove-redundant-modsecurity-indexes into master

What does this MR do?

Removes a partial index from each of ci_variables and ci_pipeline_variables that are no longer used as of !28331 (merged).

Ups & Downs

== 20200421054930 RemoveIndexOnPipelineIdFromCiPipelineVariables: migrating ===
-- transaction_open?()
   -> 0.0000s
-- indexes(:ci_pipeline_variables)
   -> 0.0029s
-- remove_index(:ci_pipeline_variables, {:algorithm=>:concurrently, :name=>"index_ci_pipeline_variables_on_pipeline_id"})
   -> 0.0023s
== 20200421054930 RemoveIndexOnPipelineIdFromCiPipelineVariables: migrated (0.0057s)

== 20200421054930 RemoveIndexOnPipelineIdFromCiPipelineVariables: reverting ===
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:ci_pipeline_variables, :pipeline_id, {:name=>"index_ci_pipeline_variables_on_pipeline_id", :where=>"key = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'", :algorithm=>:concurrently})
   -> 0.0034s
-- add_index(:ci_pipeline_variables, :pipeline_id, {:name=>"index_ci_pipeline_variables_on_pipeline_id", :where=>"key = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'", :algorithm=>:concurrently})
   -> 0.0057s
== 20200421054930 RemoveIndexOnPipelineIdFromCiPipelineVariables: reverted (0.0096s)
== 20200421054948 RemoveIndexOnPipelineIdFromCiVariables: migrating ===========
-- transaction_open?()
   -> 0.0000s
-- indexes(:ci_variables)
   -> 0.0018s
-- remove_index(:ci_variables, {:algorithm=>:concurrently, :name=>"index_ci_variables_on_project_id"})
   -> 0.0009s
== 20200421054948 RemoveIndexOnPipelineIdFromCiVariables: migrated (0.0030s) ==

== 20200421054948 RemoveIndexOnPipelineIdFromCiVariables: reverting ===========
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:ci_variables, :project_id, {:name=>"index_ci_variables_on_project_id", :where=>"key = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'", :algorithm=>:concurrently})
   -> 0.0033s
-- add_index(:ci_variables, :project_id, {:name=>"index_ci_variables_on_project_id", :where=>"key = 'AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE'", :algorithm=>:concurrently})
   -> 0.0063s
== 20200421054948 RemoveIndexOnPipelineIdFromCiVariables: reverted (0.0102s) ==

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] 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
Edited by 🤖 GitLab Bot 🤖

Merge request reports