Commit 438638cf authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'add_temp_index_on_null_project_namespace_ids' into 'master'

Add a temporary specialized index on project_namespace_id

See merge request gitlab-org/gitlab!84072
parents e39ae89c eb4d21d3
# frozen_string_literal: true
class AddTempIndexOnNullProjectNamespaceIds < Gitlab::Database::Migration[1.0]
TMP_INDEX_FOR_NULL_PROJECT_NAMESPACE_ID = 'tmp_index_for_null_project_namespace_id'
disable_ddl_transaction!
def up
add_concurrent_index :projects, :id, name: TMP_INDEX_FOR_NULL_PROJECT_NAMESPACE_ID, where: 'project_namespace_id IS NULL'
end
def down
remove_concurrent_index_by_name :projects, name: TMP_INDEX_FOR_NULL_PROJECT_NAMESPACE_ID
end
end
6152ff1a3647e1ac26e8f462215a0dec7d96c5552373f4ad99424c7c74e80577
\ No newline at end of file
......@@ -29634,6 +29634,8 @@ CREATE INDEX tmp_index_for_namespace_id_migration_on_group_members ON members US
CREATE INDEX tmp_index_for_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Namespace'::text));
CREATE INDEX tmp_index_for_null_project_namespace_id ON projects USING btree (id) WHERE (project_namespace_id IS NULL);
CREATE INDEX tmp_index_issues_on_issue_type_and_id ON issues USING btree (issue_type, id);
CREATE INDEX tmp_index_members_on_state ON members USING btree (state) WHERE (state = 2);
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