From 2e9611a92f3437da98ee72121e9daec3e68f3d91 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 26 Aug 2019 13:56:32 +1000 Subject: [PATCH] docs: comment table --- db/migrations/000029_create_latest_tagged_pact_publications.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrations/000029_create_latest_tagged_pact_publications.rb b/db/migrations/000029_create_latest_tagged_pact_publications.rb index a4954e8d5..a5615e6d4 100644 --- a/db/migrations/000029_create_latest_tagged_pact_publications.rb +++ b/db/migrations/000029_create_latest_tagged_pact_publications.rb @@ -1,5 +1,7 @@ Sequel.migration do up do + # The pact for the latest consumer version (ordered by consumer version order) *that has a pact* for each tag + # eg. For each tag, find all the consumer versions that have pacts, order them by consumer version order, then get the pact for the latest consumer version. create_or_replace_view(:latest_tagged_pact_consumer_version_orders, "select provider_id, consumer_id, t.name as tag_name, max(consumer_version_order) as latest_consumer_version_order from latest_pact_publications_by_consumer_versions ap