Fix query for certain postgresql versions.
This commit is contained in:
parent
b0596c214a
commit
966cc22131
|
@ -94,7 +94,7 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name
|
||||||
[ "select b2.id from Builds b2 join " .
|
[ "select b2.id from Builds b2 join " .
|
||||||
" (select distinct job, system, coalesce( " .
|
" (select distinct job, system, coalesce( " .
|
||||||
" (select id from builds where project = b.project and jobset = b.jobset and job = b.job and system = b.system and finished = 1 and buildStatus = 0 order by id desc offset ? limit 1)" .
|
" (select id from builds where project = b.project and jobset = b.jobset and job = b.job and system = b.system and finished = 1 and buildStatus = 0 order by id desc offset ? limit 1)" .
|
||||||
" , 0) nth from builds b where project = ? and jobset = ? and isCurrent = 1) x " .
|
" , 0) as nth from builds b where project = ? and jobset = ? and isCurrent = 1) x " .
|
||||||
" on b2.project = ? and b2.jobset = ? and b2.job = x.job and b2.system = x.system and (id >= x.nth) where finished = 1 and buildStatus = 0"
|
" on b2.project = ? and b2.jobset = ? and b2.job = x.job and b2.system = x.system and (id >= x.nth) where finished = 1 and buildStatus = 0"
|
||||||
, [ '', $keepnr - 1 ], [ '', $project->name ], [ '', $jobset->name ], [ '', $project->name ], [ '', $jobset->name ] ] }
|
, [ '', $keepnr - 1 ], [ '', $project->name ], [ '', $jobset->name ], [ '', $project->name ], [ '', $jobset->name ] ] }
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue