Commit 50a484b7 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '218526-remove-again-gitlab-issue-tracker-service' into 'master'

Remove again GitlabIssueTrackerService records

See merge request gitlab-org/gitlab!37931
parents 44799d4c 8f01b42b
---
title: Remove GitlabIssueTrackerService database records
merge_request: 37931
author:
type: other
# frozen_string_literal: true
class RemoveAgainGitlabIssueTrackerServiceRecords < ActiveRecord::Migration[6.0]
DOWNTIME = false
BATCH_SIZE = 5000
disable_ddl_transaction!
class Service < ActiveRecord::Base
include EachBatch
self.table_name = 'services'
def self.gitlab_issue_tracker_service
where(type: 'GitlabIssueTrackerService')
end
end
def up
Service.each_batch(of: BATCH_SIZE) do |services|
services.gitlab_issue_tracker_service.delete_all
end
end
def down
# no-op
end
end
83c1dca01d4e56c22f6c1cda249c9b162eb7c31e2b164629bf51ea9aa9dd8fb5
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment