class PactBroker::DB::DataMigrations::DeleteDeprecatedWebhookExecutions

Public Class Methods

call(connection) click to toggle source
# File lib/pact_broker/db/data_migrations/delete_deprecated_webhook_executions.rb, line 9
def self.call(connection)
  if columns_exist?(connection)
    connection[:webhook_executions].where(triggered_webhook_id: nil).delete
  end
end
columns_exist?(connection) click to toggle source
# File lib/pact_broker/db/data_migrations/delete_deprecated_webhook_executions.rb, line 15
def self.columns_exist?(connection)
  column_exists?(connection, :webhook_executions, :triggered_webhook_id)
end