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.68.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.68.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.67.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.66.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.65.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.64.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.63.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.62.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.61.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.60.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.60.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.59.2 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.59.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.59.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.58.3 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.58.2 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.58.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.57.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.56.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.56.0 db/migrations/20190909_add_test_results_to_all_verifications.rb