Sha256: 4e87a824e66f87509fff678906f038b91559bd99369409dddcefd97461c7ca3e

Contents?: true

Size: 535 Bytes

Versions: 11

Compression:

Stored size: 535 Bytes

Contents

Sequel.migration do
  up do
    # The most recent verification for each pact version
    create_or_replace_view(:latest_verifications,
      "SELECT v.id, v.number, v.success, v.provider_version, v.build_url, v.pact_version_id, v.execution_date, v.created_at
        FROM verifications v
        INNER JOIN (
        SELECT pact_version_id, MAX(number) latest_number
          FROM verifications
          GROUP BY pact_version_id
        ) lv ON v.pact_version_id = lv.pact_version_id AND v.number = lv.latest_number"
    )
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pact_broker-2.0.2 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.1 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.8 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.7 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.6 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.5 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.4 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.3 db/migrations/32_create_latest_verifications.rb
pact_broker-2.0.0.beta.2 db/migrations/33_create_latest_verifications.rb
pact_broker-2.0.0.beta.1 db/migrations/36_create_latest_verifications.rb