lib/pact_broker/domain/pacticipant.rb in pact_broker-2.81.0 vs lib/pact_broker/domain/pacticipant.rb in pact_broker-2.82.0

- old
+ new

@@ -24,10 +24,14 @@ one_to_one :latest_version, :class => "PactBroker::Versions::LatestVersion", primary_key: :id, key: :pacticipant_id dataset_module do include PactBroker::Repositories::Helpers + def with_main_branch_set + exclude(main_branch: nil) + end + def label label_name filter = name_like(Sequel[:labels][:name], label_name) join(:labels, {pacticipant_id: :id}).where(filter) end @@ -81,24 +85,24 @@ # Indexes: # pacticipants_pkey | PRIMARY KEY btree (id) # pacticipants_name_key | UNIQUE btree (name) # ndx_ppt_name | btree (name) # Referenced By: -# versions | versions_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id) -# webhooks | fk_webhooks_consumer | (consumer_id) REFERENCES pacticipants(id) -# webhooks | fk_webhooks_provider | (provider_id) REFERENCES pacticipants(id) -# pact_versions | pact_versions_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) -# pact_versions | pact_versions_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) +# currently_deployed_version_ids | currently_deployed_version_ids_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id) ON DELETE CASCADE +# labels | labels_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id) +# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consumer_versi_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) ON DELETE CASCADE +# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consumer_versi_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) ON DELETE CASCADE +# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_consumer_id_fk | (consumer_id) REFERENCES pacticipants(id) ON DELETE CASCADE +# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_provider_id_fk | (provider_id) REFERENCES pacticipants(id) ON DELETE CASCADE # pact_publications | pact_publications_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) # pact_publications | pact_publications_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) +# pact_versions | pact_versions_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) +# pact_versions | pact_versions_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) +# triggered_webhooks | triggered_webhooks_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) +# triggered_webhooks | triggered_webhooks_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) # verifications | verifications_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) # verifications | verifications_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) +# versions | versions_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id) # webhook_executions | webhook_executions_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) # webhook_executions | webhook_executions_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) -# labels | labels_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id) -# triggered_webhooks | triggered_webhooks_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) -# triggered_webhooks | triggered_webhooks_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) -# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consumer_versi_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id) ON DELETE CASCADE -# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consumer_versi_provider_id_fkey | (provider_id) REFERENCES pacticipants(id) ON DELETE CASCADE -# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_consumer_id_fk | (consumer_id) REFERENCES pacticipants(id) ON DELETE CASCADE -# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_provider_id_fk | (provider_id) REFERENCES pacticipants(id) ON DELETE CASCADE -# currently_deployed_version_ids | currently_deployed_version_ids_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id) ON DELETE CASCADE +# webhooks | fk_webhooks_consumer | (consumer_id) REFERENCES pacticipants(id) +# webhooks | fk_webhooks_provider | (provider_id) REFERENCES pacticipants(id)