summaryrefslogtreecommitdiff
path: root/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 11:33:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-17 11:33:21 +0000
commit7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch)
tree5bdc2229f5198d516781f8d24eace62fc7e589e9 /db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb
parent185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff)
downloadgitlab-ce-7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0.tar.gz
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb')
-rw-r--r--db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb b/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb
new file mode 100644
index 00000000000..8314767ade1
--- /dev/null
+++ b/db/post_migrate/20221028022627_add_index_on_password_last_changed_at_to_user_details.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class AddIndexOnPasswordLastChangedAtToUserDetails < Gitlab::Database::Migration[2.0]
+ INDEX_NAME = 'index_user_details_on_password_last_changed_at'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :user_details, :password_last_changed_at, name: INDEX_NAME, comment: 'JiHu-specific index'
+ end
+
+ def down
+ remove_concurrent_index_by_name :user_details, INDEX_NAME
+ end
+end