Commit 53fcc07d authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'remove-old-agent-tokens-index' into 'master'

Remove unnecessary index on cluster_agent_tokens

See merge request gitlab-org/gitlab!78348
parents 0edc5289 6fce8363
# 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
...@@ -25791,8 +25791,6 @@ CREATE INDEX index_ci_variables_on_key ON ci_variables USING btree (key); ...@@ -25791,8 +25791,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 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_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); 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