Skip to content

Commit

Permalink
chore: update sequel annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jul 22, 2021
1 parent 807bf32 commit 83cd5c5
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 41 deletions.
4 changes: 2 additions & 2 deletions lib/pact_broker/deployments/deployed_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ def record_undeployed
# version_id | integer | NOT NULL
# pacticipant_id | integer | NOT NULL
# environment_id | integer | NOT NULL
# target | text |
# target_for_index | text | NOT NULL DEFAULT ''::text
# created_at | timestamp without time zone | NOT NULL
# updated_at | timestamp without time zone | NOT NULL
# undeployed_at | timestamp without time zone |
# target | text |
# target_for_index | text | NOT NULL DEFAULT ''::text
# Indexes:
# deployed_versions_pkey | PRIMARY KEY btree (id)
# deployed_versions_uuid_index | UNIQUE btree (uuid)
Expand Down
2 changes: 1 addition & 1 deletion lib/pact_broker/deployments/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def delete
# environments_name_index | UNIQUE btree (name)
# environments_uuid_index | UNIQUE btree (uuid)
# Referenced By:
# deployed_versions | deployed_versions_environment_id_fkey | (environment_id) REFERENCES environments(id)
# currently_deployed_version_ids | currently_deployed_version_ids_environment_id_fkey | (environment_id) REFERENCES environments(id) ON DELETE CASCADE
# deployed_versions | deployed_versions_environment_id_fkey | (environment_id) REFERENCES environments(id)
# released_versions | released_versions_environment_id_fkey | (environment_id) REFERENCES environments(id)
26 changes: 13 additions & 13 deletions lib/pact_broker/domain/pacticipant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ def any_versions?
# 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)
2 changes: 1 addition & 1 deletion lib/pact_broker/domain/verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,5 +262,5 @@ def method_missing(m, *args, &block)
# verifications_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id)
# verifications_provider_id_fkey | (provider_id) REFERENCES pacticipants(id)
# Referenced By:
# triggered_webhooks | triggered_webhooks_verification_id_fkey | (verification_id) REFERENCES verifications(id)
# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_verification_id_fk | (verification_id) REFERENCES verifications(id) ON DELETE CASCADE
# triggered_webhooks | triggered_webhooks_verification_id_fkey | (verification_id) REFERENCES verifications(id)
10 changes: 5 additions & 5 deletions lib/pact_broker/domain/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ def latest_for_pacticipant?
# Foreign key constraints:
# versions_pacticipant_id_fkey | (pacticipant_id) REFERENCES pacticipants(id)
# Referenced By:
# tags | tags_version_id_fkey | (version_id) REFERENCES versions(id)
# pact_publications | pact_publications_consumer_version_id_fkey | (consumer_version_id) REFERENCES versions(id)
# verifications | fk_verifications_versions | (provider_version_id) REFERENCES versions(id)
# currently_deployed_version_ids | currently_deployed_version_ids_version_id_fkey | (version_id) REFERENCES versions(id) ON DELETE CASCADE
# deployed_versions | deployed_versions_version_id_fkey | (version_id) REFERENCES versions(id)
# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consum_consumer_version_id_fkey | (consumer_version_id) REFERENCES versions(id) ON DELETE CASCADE
# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_provider_version_id_fk | (provider_version_id) REFERENCES versions(id) ON DELETE CASCADE
# deployed_versions | deployed_versions_version_id_fkey | (version_id) REFERENCES versions(id)
# currently_deployed_version_ids | currently_deployed_version_ids_version_id_fkey | (version_id) REFERENCES versions(id) ON DELETE CASCADE
# pact_publications | pact_publications_consumer_version_id_fkey | (consumer_version_id) REFERENCES versions(id)
# released_versions | released_versions_version_id_fkey | (version_id) REFERENCES versions(id)
# tags | tags_version_id_fkey | (version_id) REFERENCES versions(id)
# verifications | fk_verifications_versions | (provider_version_id) REFERENCES versions(id)
1 change: 1 addition & 0 deletions lib/pact_broker/integrations/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def latest_verification_publication_date
end

# Table: integrations
# Primary Key: (consumer_id, provider_id)
# Columns:
# consumer_id | integer |
# consumer_name | text |
Expand Down
19 changes: 10 additions & 9 deletions lib/pact_broker/pacts/pact_publication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ def cached_domain_for_delegation

# Table: pact_publications
# Columns:
# id | integer | PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY
# consumer_version_id | integer | NOT NULL
# provider_id | integer | NOT NULL
# revision_number | integer | NOT NULL
# pact_version_id | integer | NOT NULL
# created_at | timestamp without time zone | NOT NULL
# consumer_id | integer |
# id | integer | PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY
# consumer_version_id | integer | NOT NULL
# provider_id | integer | NOT NULL
# revision_number | integer | NOT NULL
# pact_version_id | integer | NOT NULL
# created_at | timestamp without time zone | NOT NULL
# consumer_id | integer |
# consumer_version_order | integer |
# Indexes:
# pact_publications_pkey | PRIMARY KEY btree (id)
# cv_prov_revision_unq | UNIQUE btree (consumer_version_id, provider_id, revision_number)
Expand All @@ -191,6 +192,6 @@ def cached_domain_for_delegation
# pact_publications_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id)
# pact_publications_provider_id_fkey | (provider_id) REFERENCES pacticipants(id)
# Referenced By:
# webhook_executions | webhook_executions_pact_publication_id_fkey | (pact_publication_id) REFERENCES pact_publications(id)
# triggered_webhooks | triggered_webhooks_pact_publication_id_fkey | (pact_publication_id) REFERENCES pact_publications(id)
# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consum_pact_publication_id_fkey | (pact_publication_id) REFERENCES pact_publications(id) ON DELETE CASCADE
# triggered_webhooks | triggered_webhooks_pact_publication_id_fkey | (pact_publication_id) REFERENCES pact_publications(id)
# webhook_executions | webhook_executions_pact_publication_id_fkey | (pact_publication_id) REFERENCES pact_publications(id)
18 changes: 10 additions & 8 deletions lib/pact_broker/pacts/pact_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,22 @@ def verified_successfully_by_any_provider_version?

# Table: pact_versions
# Columns:
# id | integer | PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY
# consumer_id | integer | NOT NULL
# provider_id | integer | NOT NULL
# sha | text | NOT NULL
# content | text |
# created_at | timestamp without time zone | NOT NULL
# id | integer | PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY
# consumer_id | integer | NOT NULL
# provider_id | integer | NOT NULL
# sha | text | NOT NULL
# content | text |
# created_at | timestamp without time zone | NOT NULL
# messages_count | integer |
# interactions_count | integer |
# Indexes:
# pact_versions_pkey | PRIMARY KEY btree (id)
# unq_pvc_con_prov_sha | UNIQUE btree (consumer_id, provider_id, sha)
# Foreign key constraints:
# pact_versions_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id)
# pact_versions_provider_id_fkey | (provider_id) REFERENCES pacticipants(id)
# Referenced By:
# pact_publications | pact_publications_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id)
# verifications | verifications_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id)
# latest_pact_publication_ids_for_consumer_versions | latest_pact_publication_ids_for_consumer_v_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id) ON DELETE CASCADE
# latest_verification_id_for_pact_version_and_provider_version | latest_v_id_for_pv_and_pv_pact_version_id_fk | (pact_version_id) REFERENCES pact_versions(id) ON DELETE CASCADE
# pact_publications | pact_publications_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id)
# verifications | verifications_pact_version_id_fkey | (pact_version_id) REFERENCES pact_versions(id)
1 change: 1 addition & 0 deletions lib/pact_broker/webhooks/triggered_webhook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def number_of_attempts_remaining
# triggered_webhooks_provider_id_index | btree (provider_id)
# triggered_webhooks_verification_id_index | btree (verification_id)
# triggered_webhooks_webhook_id_index | btree (webhook_id)
# triggered_webhooks_webhook_uuid_index | btree (webhook_uuid)
# Foreign key constraints:
# triggered_webhooks_consumer_id_fkey | (consumer_id) REFERENCES pacticipants(id)
# triggered_webhooks_pact_publication_id_fkey | (pact_publication_id) REFERENCES pact_publications(id)
Expand Down
4 changes: 2 additions & 2 deletions lib/pact_broker/webhooks/webhook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def self.properties_hash_from_domain webhook
# fk_webhooks_consumer | (consumer_id) REFERENCES pacticipants(id)
# fk_webhooks_provider | (provider_id) REFERENCES pacticipants(id)
# Referenced By:
# webhook_headers | fk_webhookheaders_webhooks | (webhook_id) REFERENCES webhooks(id)
# webhook_executions | webhook_executions_webhook_id_fkey | (webhook_id) REFERENCES webhooks(id)
# triggered_webhooks | triggered_webhooks_webhook_id_fkey | (webhook_id) REFERENCES webhooks(id)
# webhook_events | webhook_events_webhook_id_fkey | (webhook_id) REFERENCES webhooks(id) ON DELETE CASCADE
# webhook_executions | webhook_executions_webhook_id_fkey | (webhook_id) REFERENCES webhooks(id)
# webhook_headers | fk_webhookheaders_webhooks | (webhook_id) REFERENCES webhooks(id)

0 comments on commit 83cd5c5

Please sign in to comment.