aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-10-08 19:44:09 +0100
committerChristopher Baines <mail@cbaines.net>2019-10-08 19:44:09 +0100
commitab8a02cf13e1c59867993c65a0504230e6950b8a (patch)
tree817321bdf61c208d3dd5a8598f46263415d6c286
parentdbe171bc750eee4d6b85e220e03466fc4d7b851f (diff)
downloaddata-service-ab8a02cf13e1c59867993c65a0504230e6950b8a.tar
data-service-ab8a02cf13e1c59867993c65a0504230e6950b8a.tar.gz
Sort package versions on a branch by version as well
To fix the order when the first_datetime matches.
-rw-r--r--guix-data-service/model/package.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix-data-service/model/package.scm b/guix-data-service/model/package.scm
index 1a41a88..095b48f 100644
--- a/guix-data-service/model/package.scm
+++ b/guix-data-service/model/package.scm
@@ -227,7 +227,7 @@ INNER JOIN git_branches AS last_git_branches
WHERE package_name = $1
AND package_versions_by_guix_revision_range.git_repository_id = $2
AND package_versions_by_guix_revision_range.branch_name = $3
-ORDER BY first_datetime DESC"
+ORDER BY first_datetime DESC, package_version DESC"
(list package-name
(number->string git-repository-id)
branch-name)))