diff options
Diffstat (limited to 'db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb')
-rw-r--r-- | db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb b/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb new file mode 100644 index 00000000000..cbd0d120bb8 --- /dev/null +++ b/db/post_migrate/20220901071355_cleanup_attention_request_user_callouts.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true +class CleanupAttentionRequestUserCallouts < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + restrict_gitlab_migration gitlab_schema: :gitlab_main + + ATTENTION_REQUEST_CALLOUTS = [47, 48] + # 47 and 48 were removed with https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95446 + + def up + define_batchable_model('user_callouts') + .where(feature_name: ATTENTION_REQUEST_CALLOUTS) + .each_batch { |batch| batch.delete_all } # rubocop:disable Style/SymbolProc + end + + def down + # Attention request feature has been reverted. + end +end |