diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb')
-rw-r--r-- | db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb b/db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb new file mode 100644 index 00000000000..bd40fe2203e --- /dev/null +++ b/db/migrate/20220119094023_add_unique_index_to_aed_verification_token.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddUniqueIndexToAedVerificationToken < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_audit_events_external_audit_on_verification_token' + + def up + add_concurrent_index :audit_events_external_audit_event_destinations, :verification_token, unique: true, name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :audit_events_external_audit_event_destinations, INDEX_NAME + end +end |