Skip to content
Snippets Groups Projects
Verified Commit bd236b98 authored by Natanael Silva's avatar Natanael Silva Committed by GitLab
Browse files

Add missing registry table indexes

parent 6cc8e87b
No related branches found
No related tags found
2 merge requests!170053Security patch upgrade alert: Only expose to admins 17-4,!166242Add missing registry table indexes
# frozen_string_literal: true
class AddIndexOnJobArtifactRegistry < Gitlab::Database::Migration[2.2]
milestone '17.5'
disable_ddl_transaction!
TABLE = :job_artifact_registry
INDEX_STATE = 'index_job_artifact_registry_state'
def up
add_concurrent_index TABLE, :state, name: INDEX_STATE
end
def down
remove_concurrent_index_by_name TABLE, INDEX_STATE
end
end
# frozen_string_literal: true
class AddIndexesOnFileRegistry < Gitlab::Database::Migration[2.2]
milestone '17.5'
disable_ddl_transaction!
TABLE = :file_registry
INDEX_STATE = 'index_file_registry_state'
INDEX_FILE_ID = 'index_file_registry_file_id'
def up
add_concurrent_index TABLE, :state, name: INDEX_STATE
add_concurrent_index TABLE, :file_id, name: INDEX_FILE_ID
end
def down
remove_concurrent_index_by_name TABLE, INDEX_STATE
remove_concurrent_index_by_name TABLE, INDEX_FILE_ID
end
end
5dbbc5cac0794d438bfdc42fdb46a3a26b009e96b48afe9f523e595a4aac4ea2
\ No newline at end of file
b9975a2671a1a6e67ab79ed5eb74fccf1d9aec56ec4426dd5b131b4dc5376f0b
\ No newline at end of file
......@@ -744,8 +744,12 @@ CREATE INDEX index_design_management_repository_registry_on_state ON design_mana
CREATE UNIQUE INDEX index_design_repo_registry_on_design_repo_id ON design_management_repository_registry USING btree (design_management_repository_id);
CREATE INDEX index_file_registry_file_id ON file_registry USING btree (file_id);
CREATE INDEX index_file_registry_on_retry_at ON file_registry USING btree (retry_at);
CREATE INDEX index_file_registry_state ON file_registry USING btree (state);
CREATE UNIQUE INDEX index_g_wiki_repository_registry_on_group_wiki_repository_id ON group_wiki_repository_registry USING btree (group_wiki_repository_id);
CREATE INDEX index_group_wiki_repository_registry_on_retry_at ON group_wiki_repository_registry USING btree (retry_at);
......@@ -756,6 +760,8 @@ CREATE INDEX index_job_artifact_registry_on_artifact_id ON job_artifact_registry
CREATE INDEX index_job_artifact_registry_on_retry_at ON job_artifact_registry USING btree (retry_at);
CREATE INDEX index_job_artifact_registry_state ON job_artifact_registry USING btree (state);
CREATE UNIQUE INDEX index_lfs_object_registry_on_lfs_object_id ON lfs_object_registry USING btree (lfs_object_id);
CREATE INDEX index_lfs_object_registry_on_retry_at ON lfs_object_registry USING btree (retry_at);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment