Sha256: 6fad2f3740e14d8d21ddf3e9eb26baa18d52f348dead20c274b91a302051f2fd

Contents?: true

Size: 599 Bytes

Versions: 166

Compression:

Stored size: 599 Bytes

Contents

Sequel.migration do
  up do
    create_view(:latest_verification_numbers,
      "SELECT pact_version_id, MAX(number) latest_number
          FROM verifications
          GROUP BY pact_version_id")

    # 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 latest_verification_numbers lv ON v.pact_version_id = lv.pact_version_id AND v.number = lv.latest_number"
    )
  end
end

Version data entries

166 entries across 166 versions & 1 rubygems

Version Path
pact_broker-2.68.1 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.68.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.67.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.66.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.65.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.64.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.63.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.62.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.61.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.60.1 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.60.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.59.2 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.59.1 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.59.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.58.3 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.58.2 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.58.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.57.0 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.56.1 db/migrations/000032_create_latest_verifications.rb
pact_broker-2.56.0 db/migrations/000032_create_latest_verifications.rb