sequence fix for postgresql
This commit is contained in:
@ -104,8 +104,11 @@ __PACKAGE__->belongs_to(
|
||||
{ id => "id" },
|
||||
);
|
||||
|
||||
if (getHydraPath =~ m/^dbi:Pg/) {
|
||||
__PACKAGE__->sequence('builds_id_seq');
|
||||
sub addSequence {
|
||||
my $hydradbi = getHydraDBPath ;
|
||||
if ($hydradbi =~ m/^dbi:Pg/) {
|
||||
__PACKAGE__->sequence('builds_id_seq');
|
||||
}
|
||||
}
|
||||
|
||||
sub makeSource {
|
||||
@ -123,6 +126,8 @@ sub makeQueries {
|
||||
makeSource('LatestSucceeded' . $name, "select * from (select project, jobset, job, system, max(id) as id from Builds natural join BuildResultInfo where finished = 1 and buildStatus = 0 $constraint group by project, jobset, job, system) as a natural join Builds");
|
||||
}
|
||||
|
||||
addSequence;
|
||||
|
||||
makeQueries('', "");
|
||||
makeQueries('ForProject', "and project = ?");
|
||||
makeQueries('ForJobset', "and project = ? and jobset = ?");
|
||||
|
Reference in New Issue
Block a user