Sha256: 7abe11683afbba6e9c37950dab5df9fcf920be1ee9c06c509fc64dbfb39da3a0

Contents?: true

Size: 660 Bytes

Versions: 103

Compression:

Stored size: 660 Bytes

Contents

Sequel.migration do
  up do
    create_or_replace_view(:all_verifications,
      from(:verifications).select(
        Sequel[:verifications][:id],
        Sequel[:verifications][:number],
        :success,
        :provider_version_id,
        Sequel[:v][:number].as(:provider_version_number),
        Sequel[:v][:order].as(:provider_version_order),
        :build_url,
        :pact_version_id,
        :execution_date,
        Sequel[:verifications][:created_at],
        :test_results
        ).join(:versions, {id: :provider_version_id}, {:table_alias => :v})
    )
  end

  down do
    # do nothing - you can't drop columns from a postgres view
  end
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
pact_broker-2.83.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.82.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.81.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.80.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.79.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.79.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.78.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.78.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.77.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.76.2 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.76.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.76.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.75.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.74.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.74.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.73.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.72.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.71.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.70.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.69.0 db/migrations/20190909_add_test_results_to_all_verifications.rb