From b4111af288a5ee3e0710edc79f6bc5d639366d0e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 3 May 2020 09:53:09 +0100 Subject: Fix a window clause in package-outputs-for-branch This was leading to the first and last revision datetimes to be wrong. --- guix-data-service/model/package.scm | 7 +++++-- 1 file 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 = -- cgit v1.2.3