debian-mirror-gitlab/db/post_migrate/20221129124240_remove_flowdock_integration_records.rb
2023-03-04 22:38:38 +05:30

24 lines
477 B
Ruby

# frozen_string_literal: true
class RemoveFlowdockIntegrationRecords < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
class Integration < MigrationRecord
include EachBatch
self.table_name = 'integrations'
end
def up
Integration.each_batch(of: 1000, column: :id) do |relation|
relation.delete_by(type_new: 'Integrations::Flowdock')
end
end
def down
# no-op
end
end