blob: 5e306be016a35735b24d6c841913bb7a1a485438 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# 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
|