Commit 8e56b38c authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'ab/ci-builds-token-partial-index' into 'master'

Replacement partial index for ci_builds.token

See merge request gitlab-org/gitlab!64221
parents 83f5fe39 0205c7d0
# frozen_string_literal: true
class AddPartialIndexForCiBuildsToken < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
NAME = 'index_ci_builds_on_token_partial'
def up
add_concurrent_index :ci_builds, :token, unique: true, where: 'token IS NOT NULL', name: NAME
end
def down
remove_concurrent_index_by_name :ci_builds, NAME
end
end
525fbdd66dcabbf1e6d0430468600f86fbc3c00dcfdab1c5a052294d7d73de37
\ No newline at end of file
......@@ -22830,6 +22830,8 @@ CREATE UNIQUE INDEX index_ci_builds_on_token ON ci_builds USING btree (token);
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);
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