aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-05-03 09:53:09 +0100
committerChristopher Baines <mail@cbaines.net>2020-05-03 09:53:09 +0100
commitb4111af288a5ee3e0710edc79f6bc5d639366d0e (patch)
treec1b1fc1b1a56e856401fe12f6e18a3b1c228cab4
parentedcf1c1e8f566901d3da0e40e1e8c40ca1e00ee4 (diff)
downloaddata-service-b4111af288a5ee3e0710edc79f6bc5d639366d0e.tar
data-service-b4111af288a5ee3e0710edc79f6bc5d639366d0e.tar.gz
Fix a window clause in package-outputs-for-branch
This was leading to the first and last revision datetimes to be wrong.
-rw-r--r--guix-data-service/model/package.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix-data-service/model/package.scm b/guix-data-service/model/package.scm
index 6c519f4..0f68539 100644
--- a/guix-data-service/model/package.scm
+++ b/guix-data-service/model/package.scm
@@ -427,9 +427,12 @@ FROM (
AND last_git_branches.name = $3
AND package_derivations_by_guix_revision_range.system = $5
AND package_derivations_by_guix_revision_range.target = $6
- ORDER BY first_datetime ASC, package_version DESC
) AS data1
- WINDOW path_window AS (PARTITION BY path)
+ WINDOW path_window AS (
+ PARTITION BY path
+ ORDER BY first_datetime ASC, package_version DESC
+ RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
+ )
) AS data2
LEFT OUTER JOIN builds
ON data2.derivation_output_details_set_id =