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.112.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.111.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.109.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.109.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.108.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.107.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.107.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.107.0.beta.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.106.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.105.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.104.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.103.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.102.2 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.102.1 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.102.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.101.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.100.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.99.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.98.0 db/migrations/20190909_add_test_results_to_all_verifications.rb
pact_broker-2.97.0 db/migrations/20190909_add_test_results_to_all_verifications.rb