Class: PactBroker::DB::DataMigrations::SetWebhooksEnabled
- Inherits:
-
Object
- Object
- PactBroker::DB::DataMigrations::SetWebhooksEnabled
- Extended by:
- Helpers
- Defined in:
- lib/pact_broker/db/data_migrations/set_webhooks_enabled.rb
Class Method Summary collapse
Methods included from Helpers
column_exists?, columns_exist?
Class Method Details
.call(connection) ⇒ Object
9 10 11 12 13 |
# File 'lib/pact_broker/db/data_migrations/set_webhooks_enabled.rb', line 9 def self.call(connection) if column_exists?(connection, :webhooks, :enabled) connection[:webhooks].where(enabled: nil).update(enabled: true) end end |