Commit b482db0a authored by can eldem's avatar can eldem

Remove unique index and add composite key index to SO

Add changelog
parent 15a3481e
---
title: Remove unique index and add composite key index to Security Orchestration
merge_request: 55521
author:
type: other
# frozen_string_literal: true
class RemoveIndexForSecurityOrchestrationPolicy < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_sop_configs_on_security_policy_management_project_id'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name(:security_orchestration_policy_configurations, INDEX_NAME)
end
def down
add_concurrent_index(:security_orchestration_policy_configurations, :security_policy_management_project_id, name: INDEX_NAME)
end
end
# frozen_string_literal: true
class AddIndexToSecurityOrchestrationPolicy < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX = 'index_sop_configurations_project_id_policy_project_id'
disable_ddl_transaction!
def up
add_concurrent_index :security_orchestration_policy_configurations, [:security_policy_management_project_id, :project_id], name: INDEX
end
def down
remove_concurrent_index_by_name :security_orchestration_policy_configurations, INDEX
end
end
104e767518d55a7caa5ff517efe978287beb629649c681a2871ada8a677a0e13
\ No newline at end of file
e5c589decb2bc8d3e37451bf9977a810308ee37f5f02ed96226e0be87f8b908d
\ No newline at end of file
...@@ -23535,7 +23535,7 @@ CREATE UNIQUE INDEX index_software_licenses_on_unique_name ON software_licenses ...@@ -23535,7 +23535,7 @@ CREATE UNIQUE INDEX index_software_licenses_on_unique_name ON software_licenses
CREATE UNIQUE INDEX index_sop_configs_on_project_id ON security_orchestration_policy_configurations USING btree (project_id); CREATE UNIQUE INDEX index_sop_configs_on_project_id ON security_orchestration_policy_configurations USING btree (project_id);
CREATE UNIQUE INDEX index_sop_configs_on_security_policy_management_project_id ON security_orchestration_policy_configurations USING btree (security_policy_management_project_id); CREATE INDEX index_sop_configurations_project_id_policy_project_id ON security_orchestration_policy_configurations USING btree (security_policy_management_project_id, project_id);
CREATE INDEX index_sprints_iterations_cadence_id ON sprints USING btree (iterations_cadence_id); CREATE INDEX index_sprints_iterations_cadence_id ON sprints USING btree (iterations_cadence_id);
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