* Added a maintainers field to the Builds table.

* Regenerated the schema bindings with the latest DBIx::Class.
This commit is contained in:
Eelco Dolstra 2009-07-07 13:59:59 +00:00
parent 6bcdfc8a1f
commit 5bdd5e7152
23 changed files with 813 additions and 176 deletions

View file

@ -86,6 +86,9 @@
create index IndexBuildInputsByDependency on BuildInputs(dependency);
create index IndexBuildsByTimestamp on Builds(timestamp);
alter table jobs add column disabled integer not null default 0;
alter table builds add column maintainers text;
* Job selection:
@ -102,6 +105,13 @@
$ for i in $(cat ids); do echo $i; sqlite3 hydra.sqlite "begin transaction; insert into buildschedulinginfo (id, priority, busy, locker) values($i, 100, 0, ''); delete from buildresultinfo where id = $i; update builds set finished = 0 where id = $i; commit transaction;"; done
Or with Postgres:
(restarting all aborted builds with ID > 42000)
$ psql -h buildfarm.st.ewi.tudelft.nl -U hydra hydra -t -c 'select x.id from builds x join buildresultinfo r on r.id = x.id where finished = 1 and buildstatus = 3 and x.id > 42000' > ids
$ for i in $(cat ids); do echo $i; PGPASSWORD=... psql -h buildfarm.st.ewi.tudelft.nl -U hydra hydra -t -c "begin transaction; insert into buildschedulinginfo (id, priority, busy, locker) values($i, 100, 0, ''); delete from buildresultinfo where id = $i; update builds set finished = 0 where id = $i; commit transaction;"; done
* select * from (select project, jobset, job, system, max(timestamp) timestamp from builds where finished = 1 group by project, jobset, job, system) x join builds y on x.timestamp = y.timestamp and x.project = y.project and x.jobset = y.jobset and x.job = y.job and x.system = y.system;

View file

@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
__PACKAGE__->load_classes;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aJVSTLLx1pgutjETaqTWXA
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tt53dmgGYiV3yqHvnrSwkg
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,38 +9,105 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("BuildInputs");
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"build",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 1,
size => undef,
},
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"type",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"uri",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"revision",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"tag",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"value",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"dependency",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 1,
size => undef,
},
"path",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"sha256hash",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
__PACKAGE__->belongs_to(
"build",
"Hydra::Schema::Builds",
{ id => "build" },
{ join_type => "LEFT OUTER" },
);
__PACKAGE__->belongs_to(
"dependency",
"Hydra::Schema::Builds",
{ id => "dependency" },
{ join_type => "LEFT OUTER" },
);
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:02BDWXRn4LMcb0LFjHXqjg
use Hydra::Helper::Nix;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uxfS8+GnU06sbx6nvWzTSQ
sub addSequence {
my $hydradbi = getHydraDBPath ;
if ($hydradbi =~ m/^dbi:Pg/) {

View file

@ -9,34 +9,90 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("BuildProducts");
__PACKAGE__->add_columns(
"build",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"productnr",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"type",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"subtype",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"filesize",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"sha1hash",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"sha256hash",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"path",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"description",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"defaultpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("build", "productnr");
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wnnwDGQMGr2YAu++PYRSuA
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fqzw8pcHMrUjdJZ/a43D3w
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,34 +9,85 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("BuildResultInfo");
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"iscachedbuild",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"buildstatus",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"errormsg",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"starttime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"stoptime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"logfile",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"releasename",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"keep",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
"faileddepbuild",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"faileddepstepnr",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CGlUjhJozOA4VCYaFtyhqw
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KjrreyjxFwFTGDzdA9J42w
__PACKAGE__->belongs_to(
"failedDep",

View file

@ -9,26 +9,42 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("BuildSchedulingInfo");
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"priority",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
"busy",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
"locker",
{ data_type => "text", is_nullable => 0, size => undef },
{ data_type => "text", default_value => "''", is_nullable => 0, size => undef },
"logfile",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"disabled",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
"starttime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X+Pz2XzTBNU3XdEcg49RyQ
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jgOkt31QNifyPD8Y0rkVBA
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,33 +9,89 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("BuildSteps");
__PACKAGE__->add_columns(
"build",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"stepnr",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"type",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"drvpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"outpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"logfile",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"busy",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"status",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"errormsg",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"starttime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"stoptime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("build", "stepnr");
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TtcOwOIZHO0vLSJ1CXF1bA
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7z14GDq6a8ndBoj3Mx/3TQ
1;

View file

@ -9,33 +9,113 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("Builds");
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"finished",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"timestamp",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"jobset",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"job",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"nixname",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"description",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"drvpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"outpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"system",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"longdescription",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"license",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"homepage",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"maintainers",
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" });
@ -49,13 +129,13 @@ __PACKAGE__->belongs_to(
"Hydra::Schema::Jobs",
{ jobset => "jobset", name => "job", project => "project" },
);
__PACKAGE__->has_many(
"buildschedulinginfoes",
__PACKAGE__->might_have(
"buildschedulinginfo",
"Hydra::Schema::BuildSchedulingInfo",
{ "foreign.id" => "self.id" },
);
__PACKAGE__->has_many(
"buildresultinfoes",
__PACKAGE__->might_have(
"buildresultinfo",
"Hydra::Schema::BuildResultInfo",
{ "foreign.id" => "self.id" },
);
@ -81,16 +161,24 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xqKyjCWVdoTyQJC28K3WXA
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mTc++yn7RST163jLNJkXaw
use Hydra::Helper::Nix;
__PACKAGE__->has_many(dependents => 'Hydra::Schema::BuildInputs', 'dependency');
__PACKAGE__->has_many(
"dependents",
"Hydra::Schema::BuildInputs",
{ "foreign.dependency" => "self.id" },
);
__PACKAGE__->many_to_many(dependentBuilds => 'dependents', 'build');
__PACKAGE__->has_many(inputs => 'Hydra::Schema::BuildInputs', 'build');
__PACKAGE__->has_many(
"inputs",
"Hydra::Schema::BuildInputs",
{ "foreign.build" => "self.id" },
);
__PACKAGE__->belongs_to(
"schedulingInfo",

View file

@ -9,21 +9,46 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("CachedPathInputs");
__PACKAGE__->add_columns(
"srcpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"timestamp",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"lastseen",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"sha256hash",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"storepath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("srcpath", "sha256hash");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Eo9F2GRzgzTGGx15JWBv6Q
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sEZCtuR96OmFAZe4ykVTUA
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,19 +9,39 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("CachedSubversionInputs");
__PACKAGE__->add_columns(
"uri",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"revision",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"sha256hash",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"storepath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("uri", "revision");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KeKwcnnPNoVO4eNr9+y+1g
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ImarwuHMkKrQ2GemxREDig
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,19 +9,53 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("Jobs");
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"jobset",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"active",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 1, is_nullable => 0, size => undef },
"errormsg",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"firstevaltime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"lastevaltime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"disabled",
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("project", "jobset", "name");
__PACKAGE__->has_many(
@ -41,8 +75,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wJFyUvUACQHpaW/ktaYtOQ
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OFEAwA4W5q0AF8uZ3JswFQ
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,19 +9,57 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("JobsetInputAlts");
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"jobset",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"input",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"altnr",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
"value",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"revision",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"tag",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("project", "jobset", "input", "altnr");
__PACKAGE__->belongs_to(
@ -31,8 +69,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V8h/34X4hs4PKhxKsFgy9w
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kcIcgSux+SzIH7FQs2cnAw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,13 +9,35 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("JobsetInputs");
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"jobset",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"type",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("project", "jobset", "name");
__PACKAGE__->has_many(
@ -43,8 +65,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1XdnQh4HnXU/iOyNvv8QWg
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SkF1SaumgGAQvR9mUbPV+Q
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,21 +9,64 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("Jobsets");
__PACKAGE__->add_columns(
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"description",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"nixexprinput",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"nixexprpath",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"errormsg",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"errortime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"lastcheckedtime",
{ data_type => "integer", is_nullable => 0, size => undef },
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("project", "name");
__PACKAGE__->has_many(
@ -58,8 +101,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oZ81xw7qIjVkQKjRdOFW9A
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lMdNiE6x4qZLK14+jEM7YQ
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,17 +9,43 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("Projects");
__PACKAGE__->add_columns(
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"displayname",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"description",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"enabled",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 1, is_nullable => 0, size => undef },
"owner",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"homepage",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
__PACKAGE__->set_primary_key("name");
__PACKAGE__->has_many(
@ -50,8 +76,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z+RXYaHk0RXJfFirBe175A
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lDNoBncP2KhnrfbQIg+Usw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,21 +9,53 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("ReleaseSetJobs");
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"release_",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"job",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"attrs",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"isprimary",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
"mayfail",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
"description",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"jobset",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("project", "release_", "job", "attrs");
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" });
@ -34,8 +66,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iWBkyucz/pXtzI+s0iP0EA
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xaWTZqtzPyMq/xqi0ZFCDg
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,13 +9,29 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("ReleaseSets");
__PACKAGE__->add_columns(
"project",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"name",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"description",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"keep",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 0, is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("project", "name");
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" });
@ -29,8 +45,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eeWkr8kYyCvFVDZ3YzpI1Q
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sYojSdWhlGMAL7Vj/UynBw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,15 +9,20 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("SystemTypes");
__PACKAGE__->add_columns(
"system",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"maxconcurrent",
{ data_type => "integer", is_nullable => 0, size => undef },
{ data_type => "integer", default_value => 2, is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("system");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z83sYSKRnt5mc2etYvH6Zg
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QYzvQmgXtV3NURhO5j5F4Q
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,16 +9,27 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("UserRoles");
__PACKAGE__->add_columns(
"username",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_foreign_key => 1,
is_nullable => 0,
size => undef,
},
"role",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("username", "role");
__PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WRiW+nBfh/X+TMqYu0PI6g
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:syo00cqS/fp5mJt2jg+YJw
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -9,13 +9,33 @@ __PACKAGE__->load_components("Core");
__PACKAGE__->table("Users");
__PACKAGE__->add_columns(
"username",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"fullname",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"emailaddress",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"password",
{ data_type => "text", is_nullable => 0, size => undef },
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
);
__PACKAGE__->set_primary_key("username");
__PACKAGE__->has_many(
@ -30,8 +50,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-13 13:33:20
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gw6X/Et2+whq/S7o63zF8Q
# Created by DBIx::Class::Schema::Loader v0.04999_06 @ 2009-07-07 14:36:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZH7GmAkTPdZm7G5aCp746A
# You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -61,7 +61,7 @@ sub checkBuilds {
# Get the system types for the runnable builds.
my @systemTypes = $db->resultset('Builds')->search(
{ finished => 0, busy => 0, enabled => 1, disabled => 0 },
{ join => ['schedulingInfo', 'project'], select => [{distinct => 'system'}], as => ['system'] });
{ join => ['schedulingInfo', 'project'], group_by => 'system', as => ['system'] });
# For each system type, select up to the maximum number of
# concurrent build for that system type. Choose the highest

View file

@ -295,7 +295,7 @@ sub checkJob {
, system => $job->{system}
});
$build->buildschedulinginfoes->create(
$build->create_related('buildschedulinginfo',
{ priority => $priority
, busy => 0
, locker => ""

View file

@ -25,6 +25,7 @@ create table Builds (
longDescription text, -- meta.longDescription
license text, -- meta.license
homepage text, -- meta.homepage
maintainers text, -- meta.maintainers (concatenated, comma-separated)
foreign key (project) references Projects(name), -- ignored by sqlite
foreign key (project, jobset) references Jobsets(project, name), -- ignored by sqlite