Sha256: 75665fc1af979e1fff2b4e57c6be91cb239c9c6dab994caec44cf9673745bc0a

Contents?: true

Size: 1.61 KB

Versions: 46

Compression:

Stored size: 1.61 KB

Contents

require 'pact_broker/domain/verification'

module PactBroker
  module Verifications
    class LatestVerificationIdForPactVersionAndProviderVersion < Sequel::Model(:latest_verification_id_for_pact_version_and_provider_version)

      unrestrict_primary_key

      dataset_module do
        include PactBroker::Repositories::Helpers
      end

      def upsert
        self.class.upsert(to_hash, [:pact_version_id, :provider_version_id])
      end
    end
  end
end

# Table: latest_verification_id_for_pact_version_and_provider_version
# Columns:
#  consumer_id         | integer | NOT NULL
#  pact_version_id     | integer | NOT NULL
#  provider_id         | integer | NOT NULL
#  provider_version_id | integer | NOT NULL
#  verification_id     | integer | NOT NULL
# Indexes:
#  latest_v_id_for_pv_and_pv_pv_id_pv_id_unq | UNIQUE btree (pact_version_id, provider_version_id)
#  latest_v_id_for_pv_and_pv_v_id_unq        | UNIQUE btree (verification_id)
#  latest_v_id_for_pv_and_pv_pv_id_v_id      | btree (pact_version_id, verification_id)
# Foreign key constraints:
#  latest_v_id_for_pv_and_pv_consumer_id_fk         | (consumer_id) REFERENCES pacticipants(id) ON DELETE CASCADE
#  latest_v_id_for_pv_and_pv_pact_version_id_fk     | (pact_version_id) REFERENCES pact_versions(id) ON DELETE CASCADE
#  latest_v_id_for_pv_and_pv_provider_id_fk         | (provider_id) REFERENCES pacticipants(id) ON DELETE CASCADE
#  latest_v_id_for_pv_and_pv_provider_version_id_fk | (provider_version_id) REFERENCES versions(id) ON DELETE CASCADE
#  latest_v_id_for_pv_and_pv_verification_id_fk     | (verification_id) REFERENCES verifications(id) ON DELETE CASCADE

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
pact_broker-2.58.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.57.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.56.1 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.56.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.55.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.54.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.53.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.52.2 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.52.1 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.52.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.51.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.50.1 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.50.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.49.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.48.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.47.1 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.47.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.46.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.45.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
pact_broker-2.44.0 lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb