Skip to content
Snippets Groups Projects
Commit 597899e6 authored by Marius Bobin's avatar Marius Bobin :two:
Browse files

Remove plaintext token index from ci_builds

Changelog: other
parent 5415e709
No related branches found
No related tags found
1 merge request!91258Remove plaintext token index from ci_builds
# frozen_string_literal: true
class DropTokenIndexFromCiBuilds < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_ci_builds_on_token_partial'
def up
remove_concurrent_index_by_name :ci_builds, INDEX_NAME
end
# rubocop:disable Migration/PreventIndexCreation
def down
add_concurrent_index :ci_builds, :token, unique: true, where: 'token IS NOT NULL', name: INDEX_NAME
end
# rubocop:enable Migration/PreventIndexCreation
end
5a4a6355d1954735a05831e17c97e2879320f2cb313be56fb72e1cd2c20d9090
\ No newline at end of file
......@@ -27495,8 +27495,6 @@ CREATE INDEX index_ci_builds_on_status_and_type_and_runner_id ON ci_builds USING
 
CREATE UNIQUE INDEX index_ci_builds_on_token_encrypted ON ci_builds USING btree (token_encrypted) WHERE (token_encrypted IS NOT NULL);
 
CREATE UNIQUE INDEX index_ci_builds_on_token_partial ON ci_builds USING btree (token) WHERE (token IS NOT NULL);
CREATE INDEX index_ci_builds_on_updated_at ON ci_builds USING btree (updated_at);
 
CREATE INDEX index_ci_builds_on_upstream_pipeline_id ON ci_builds USING btree (upstream_pipeline_id) WHERE (upstream_pipeline_id IS NOT NULL);
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