diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-03 09:53:09 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-03 09:53:09 +0100 |
commit | b4111af288a5ee3e0710edc79f6bc5d639366d0e (patch) | |
tree | c1b1fc1b1a56e856401fe12f6e18a3b1c228cab4 | |
parent | edcf1c1e8f566901d3da0e40e1e8c40ca1e00ee4 (diff) | |
download | data-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.scm | 7 |
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 = |