Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-14 11:41:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-14 11:41:52 +0300
commit585826cb22ecea5998a2c2a4675735c94bdeedac (patch)
tree5b05f0b30d33cef48963609e8a18a4dff260eab3 /db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb
parentdf221d036e5d0c6c0ee4d55b9c97f481ee05dee8 (diff)
Add latest changes from gitlab-org/gitlab@16-6-stable-eev16.6.0-rc42
Diffstat (limited to 'db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb')
-rw-r--r--db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb b/db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb
index 5b9b4e36512..e299ce394a3 100644
--- a/db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb
+++ b/db/post_migrate/20230619005223_change_unconfirmed_created_at_index_on_users.rb
@@ -7,9 +7,11 @@ class ChangeUnconfirmedCreatedAtIndexOnUsers < Gitlab::Database::Migration[2.1]
NEW_INDEX_NAME = 'index_users_on_unconfirmed_created_at_active_type_sign_in_count'
def up
+ # rubocop:disable Migration/PreventIndexCreation
add_concurrent_index :users, [:created_at, :id],
name: NEW_INDEX_NAME,
where: "confirmed_at IS NULL AND state = 'active' AND user_type IN (0) AND sign_in_count = 0"
+ # rubocop:enable Migration/PreventIndexCreation
remove_concurrent_index_by_name :users, OLD_INDEX_NAME
end