Sha256: db5540e6b24d1d77562d7c9f4cfd8e1fc65179d9f7510778b04fc81fa42ae184

Contents?: true

Size: 890 Bytes

Versions: 62

Compression:

Stored size: 890 Bytes

Contents

Sequel.migration do
  up do
    # The latest verification id for each consumer version tag
    create_or_replace_view(:latest_verification_ids_for_consumer_and_provider,
      "select
        provider_id,
        consumer_id,
        max(id) as latest_verification_id
        from verifications v
        group by provider_id, consumer_id")
  end

  down do
    # The latest verification id for each consumer version tag
    create_or_replace_view(:latest_verification_ids_for_consumer_and_provider,
      "select
        pv.pacticipant_id as provider_id,
        lpp.consumer_id,
        max(v.id) as latest_verification_id
      from verifications v
      join latest_pact_publications_by_consumer_versions lpp
        on v.pact_version_id = lpp.pact_version_id
      join versions pv
        on v.provider_version_id = pv.id
      group by pv.pacticipant_id, lpp.consumer_id")
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
pact_broker-2.39.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.38.1 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.38.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.37.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.36.1 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.36.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.35.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.34.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.33.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.32.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.31.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.30.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.29.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.27.6 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.27.5 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.27.4 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.27.3 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.27.2 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.27.0 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb
pact_broker-2.26.1 db/migrations/20180614_update_latest_verification_ids_for_consumer_and_provider.rb