Sha256: 136254879af1a76ba5ed5faa6f36e8994ec39ae1ca57689c07100558e37686d6

Contents?: true

Size: 781 Bytes

Versions: 70

Compression:

Stored size: 781 Bytes

Contents

Sequel.migration do
  up do
    create_or_replace_view(:latest_tagged_pact_consumer_version_orders,
      "select provider_id, consumer_id, t.name as tag_name, max(consumer_version_order) as latest_consumer_version_order
      from latest_pact_publications_by_consumer_versions ap
      inner join tags t
      on t.version_id = ap.consumer_version_id
      group by provider_id, consumer_id, t.name"
    )

    create_view(:latest_tagged_pact_publications,
      "select lp.*, o.tag_name
      from latest_pact_publications_by_consumer_versions lp
      inner join latest_tagged_pact_consumer_version_orders o
      on lp.consumer_id = o.consumer_id
        and lp.provider_id = o.provider_id
        and lp.consumer_version_order = latest_consumer_version_order"
    )
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
pact_broker-2.35.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.34.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.33.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.32.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.31.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.30.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.29.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.27.6 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.27.5 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.27.4 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.27.3 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.27.2 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.27.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.26.1 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.26.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.25.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.24.0 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.23.4 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.23.3 db/migrations/000029_create_latest_tagged_pact_publications.rb
pact_broker-2.23.2 db/migrations/000029_create_latest_tagged_pact_publications.rb