Sha256: d371a196cbab2bb84190c3d69e565bd66ecd4cc789da326af8c9af46d4043d3a

Contents?: true

Size: 542 Bytes

Versions: 41

Compression:

Stored size: 542 Bytes

Contents

Sequel.migration do
  change do
    alter_table(:webhooks) do
      add_column(:consumer_label, String)
      add_column(:provider_label, String)
    end

    # SQLite workaround - with one `alter_table` block it adds only last constraint.
    alter_table(:webhooks) do
      add_constraint(:consumer_label_exclusion, "consumer_id IS NULL OR (consumer_id IS NOT NULL AND consumer_label IS NULL)")
      add_constraint(:provider_label_exclusion, "provider_id IS NULL OR (provider_id IS NOT NULL AND provider_label IS NULL)")
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
pact_broker-2.114.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.113.2 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.113.1 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.113.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.112.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.111.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.109.1 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.109.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.108.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.107.1 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.107.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.107.0.beta.1 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.106.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.105.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.104.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.103.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.102.2 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.102.1 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.102.0 db/migrations/20210914_add_labels_to_webhooks.rb
pact_broker-2.101.0 db/migrations/20210914_add_labels_to_webhooks.rb