diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-05 18:08:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-05 18:08:56 +0000 |
commit | d66704a6c6edbfaf3f8652c934c8ad2356c7d07b (patch) | |
tree | c0441d46e6ff9936265885bd7a7bbe8929623ab6 /db/migrate | |
parent | 5db6a7a014eb5cac640767687819c2784b24187a (diff) | |
download | gitlab-ce-d66704a6c6edbfaf3f8652c934c8ad2356c7d07b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20221102231131_remove_temp_index_for_user_details_fields.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/db/migrate/20221102231131_remove_temp_index_for_user_details_fields.rb b/db/migrate/20221102231131_remove_temp_index_for_user_details_fields.rb deleted file mode 100644 index 340d1205ef7..00000000000 --- a/db/migrate/20221102231131_remove_temp_index_for_user_details_fields.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -class RemoveTempIndexForUserDetailsFields < Gitlab::Database::Migration[2.0] - BACKFILL_MIGRATION = 'BackfillUserDetailsFields' - INDEX_NAME = 'tmp_idx_where_user_details_fields_filled' - - disable_ddl_transaction! - - def up - finalize_background_migration BACKFILL_MIGRATION - remove_concurrent_index_by_name :users, INDEX_NAME - end - - def down - # rubocop:disable Migration/PreventIndexCreation - add_concurrent_index :users, :id, name: INDEX_NAME, where: <<~QUERY - (COALESCE(linkedin, '') IS DISTINCT FROM '') - OR (COALESCE(twitter, '') IS DISTINCT FROM '') - OR (COALESCE(skype, '') IS DISTINCT FROM '') - OR (COALESCE(website_url, '') IS DISTINCT FROM '') - OR (COALESCE(location, '') IS DISTINCT FROM '') - OR (COALESCE(organization, '') IS DISTINCT FROM '') - QUERY - # rubocop:enable Migration/PreventIndexCreation - end -end |