Fix more issues with the git_commits introduction

This commit is contained in:
Christopher Baines 2022-05-23 22:49:51 +01:00
parent 6d403cbc8d
commit d4bb0ffaaa
3 changed files with 17 additions and 9 deletions

View file

@ -1734,11 +1734,12 @@ SELECT
commit IN (
SELECT commit FROM (
SELECT DISTINCT ON (name)
name, git_branches.commit
name, git_commits.commit
FROM git_branches
INNER JOIN git_commits
ON git_commits.git_branch_id = git_branches.id
WHERE
git_branches.git_repository_id = load_new_guix_revision_jobs.git_repository_id AND
git_branches.commit IS NOT NULL
git_branches.git_repository_id = load_new_guix_revision_jobs.git_repository_id
ORDER BY name, datetime DESC
) branches_and_latest_commits
) AS latest_branch_commit
@ -1870,11 +1871,12 @@ SELECT
commit IN (
SELECT commit FROM (
SELECT DISTINCT ON (name)
name, git_branches.commit
name, git_commits.commit
FROM git_branches
INNER JOIN git_commits
ON git_commits.git_branch_id = git_branches.id
WHERE
git_branches.git_repository_id = load_new_guix_revision_jobs.git_repository_id AND
git_branches.commit IS NOT NULL
git_branches.git_repository_id = load_new_guix_revision_jobs.git_repository_id
ORDER BY name, datetime DESC
) branches_and_latest_commits
) AS latest_branch_commit