Commit d74b5255 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'vij-tmp-member-state-index' into 'master'

Add a temporary index for Member.state

See merge request gitlab-org/gitlab!77298
parents 9f7ece4a 4a0852c6
# frozen_string_literal: true
class AddTempIndexToMembersState < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = 'tmp_index_members_on_state'
def up
# Temporary index to be removed in 14.9 https://gitlab.com/gitlab-org/gitlab/-/issues/349960
add_concurrent_index :members, :state, name: INDEX_NAME, where: 'state = 2'
end
def down
remove_concurrent_index_by_name :members, INDEX_NAME
end
end
e08c1634376ed78b78c4a54d874bed66c1ce40c7c509b67cfda00d1a8657f127
\ No newline at end of file
...@@ -28065,6 +28065,8 @@ CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occu ...@@ -28065,6 +28065,8 @@ CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occu
CREATE INDEX tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99 ON vulnerability_occurrences USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99])); CREATE INDEX tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99 ON vulnerability_occurrences USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99]));
CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2);
CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_child_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NOT NULL) AND (traversal_ids = '{}'::integer[])); CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_child_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NOT NULL) AND (traversal_ids = '{}'::integer[]));
CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_root_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NULL) AND (traversal_ids = '{}'::integer[])); CREATE INDEX tmp_index_namespaces_empty_traversal_ids_with_root_namespaces ON namespaces USING btree (id) WHERE ((parent_id IS NULL) AND (traversal_ids = '{}'::integer[]));
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