diff options
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.rb | 15 |
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 |