Commit 6fce8363 authored by Tiger's avatar Tiger

Remove unnecessary index on cluster_agent_tokens

This index has been replaced by
index_cluster_agent_tokens_on_agent_id_status_last_used_at

Changelog: other
parent a19fba1b
# frozen_string_literal: true
class RemoveIndexClusterAgentTokensOnAgentIdAndLastUsedAt < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX = 'index_cluster_agent_tokens_on_agent_id_and_last_used_at'
def up
remove_concurrent_index_by_name :cluster_agent_tokens, name: INDEX
end
def down
add_concurrent_index :cluster_agent_tokens, 'agent_id, last_used_at DESC NULLS LAST', name: INDEX
end
end
afc54500374602edcdc4fce5acf3673b84882da1afbb5598a6684a5ef480a2d7
\ No newline at end of file
......@@ -25787,8 +25787,6 @@ CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key);
CREATE UNIQUE INDEX index_ci_variables_on_project_id_and_key_and_environment_scope ON ci_variables USING btree (project_id, key, environment_scope);
CREATE INDEX index_cluster_agent_tokens_on_agent_id_and_last_used_at ON cluster_agent_tokens USING btree (agent_id, last_used_at DESC NULLS LAST);
CREATE INDEX index_cluster_agent_tokens_on_agent_id_status_last_used_at ON cluster_agent_tokens USING btree (agent_id, status, last_used_at DESC NULLS LAST);
CREATE INDEX index_cluster_agent_tokens_on_created_by_user_id ON cluster_agent_tokens USING btree (created_by_user_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