WYN733STK5DUQSWHSS6EYZK32KPZII64HLX4NS7TYUSFZ6AAFLGAC # select * from builds as x where timestamp == (select max(timestamp) from builds where name == x.name);$c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "name", where => "timestamp == (select max(timestamp) from builds where name == me.name)"})];
# select * from builds as x where timestamp == (select max(timestamp) from builds where jobName == x.jobName);$c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "jobName", where => "timestamp == (select max(timestamp) from builds where jobName == me.jobName)"})];
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-25 22:23:27# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:01Br5qFsV84USpzqnjk7cw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-28 17:59:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xXiHLBKW5fHl7ukdYeIsTw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-25 22:23:27# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jYe9p4xG2Ujnf6TsfeE7tA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-28 17:59:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5SPq4at2/NRvbax49TwfDw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-25 22:23:27# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gxVH+2KWcgU41JOl9BbHFA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-28 17:59:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gp6ZZpDA2VzgnNE9NX99dA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-25 22:23:27# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iW1lrJQVyiDiAYhJBy9/iQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-10-28 17:59:29# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fayli8dtSdcAYhfKSZnJwg
buildStatus integer -- 0 = succeeded, 1 = failure, ...
isCachedBuild integer not null, -- booleanbuildStatus integer, -- 0 = succeeded, 1 = Nix build failure, 2 = positive build failureerrorMsg text, -- error message in case of a Nix failurestartTime integer, -- in Unix time, 0 = used cached build resultstopTime integer
$dbh->prepare("insert into builds(timestamp, name, description, drvPath, outPath, buildStatus) values(?, ?, ?, ?, ?, ?)")->execute(time(), $jobName, $description, $drvPath, $outPath, $buildStatus);
$dbh->prepare("insert into builds(timestamp, jobName, description, drvPath, outPath, isCachedBuild, buildStatus, errorMsg, startTime, stopTime) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")->execute(time(), $jobName, $description, $drvPath, $outPath, $isCachedBuild, $buildStatus, "", $startTime, $stopTime);