From 6cb58ef581c73f4123c6ecad7cb74dd54c88f0c8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Dec 2008 16:26:33 +0000 Subject: [PATCH] * Make the schema class names match the case of the SQL table names. --- src/Hydra/lib/Hydra/Controller/Root.pm | 2 +- src/Hydra/lib/Hydra/Schema.pm | 4 ++-- .../Schema/{Buildinputs.pm => BuildInputs.pm} | 6 ++--- .../{Buildproducts.pm => BuildProducts.pm} | 6 ++--- ...{Buildresultinfo.pm => BuildResultInfo.pm} | 6 ++--- ...hedulinginfo.pm => BuildSchedulingInfo.pm} | 6 ++--- .../Schema/{Buildsteps.pm => BuildSteps.pm} | 6 ++--- src/Hydra/lib/Hydra/Schema/Builds.pm | 24 +++++++++---------- ...achedpathinputs.pm => CachedPathInputs.pm} | 6 ++--- ...ioninputs.pm => CachedSubversionInputs.pm} | 6 ++--- ...{Jobsetinputalts.pm => JobsetInputAlts.pm} | 8 +++---- .../{Jobsetinputs.pm => JobsetInputs.pm} | 8 +++---- src/Hydra/lib/Hydra/Schema/Jobsets.pm | 8 +++---- src/Hydra/lib/Hydra/Schema/Projects.pm | 8 +++---- .../{Releasesetjobs.pm => ReleaseSetJobs.pm} | 8 +++---- .../Schema/{Releasesets.pm => ReleaseSets.pm} | 8 +++---- .../Schema/{Systemtypes.pm => SystemTypes.pm} | 6 ++--- .../Schema/{Userroles.pm => UserRoles.pm} | 6 ++--- src/Hydra/lib/Hydra/Schema/Users.pm | 6 ++--- src/Hydra/script/hydra_build.pl | 20 ++++++++-------- src/Hydra/script/hydra_queue_runner.pl | 2 +- src/Hydra/script/hydra_scheduler.pl | 14 +++++------ 22 files changed, 87 insertions(+), 87 deletions(-) rename src/Hydra/lib/Hydra/Schema/{Buildinputs.pm => BuildInputs.pm} (92%) rename src/Hydra/lib/Hydra/Schema/{Buildproducts.pm => BuildProducts.pm} (91%) rename src/Hydra/lib/Hydra/Schema/{Buildresultinfo.pm => BuildResultInfo.pm} (90%) rename src/Hydra/lib/Hydra/Schema/{Buildschedulinginfo.pm => BuildSchedulingInfo.pm} (88%) rename src/Hydra/lib/Hydra/Schema/{Buildsteps.pm => BuildSteps.pm} (91%) rename src/Hydra/lib/Hydra/Schema/{Cachedpathinputs.pm => CachedPathInputs.pm} (86%) rename src/Hydra/lib/Hydra/Schema/{Cachedsubversioninputs.pm => CachedSubversionInputs.pm} (84%) rename src/Hydra/lib/Hydra/Schema/{Jobsetinputalts.pm => JobsetInputAlts.pm} (86%) rename src/Hydra/lib/Hydra/Schema/{Jobsetinputs.pm => JobsetInputs.pm} (88%) rename src/Hydra/lib/Hydra/Schema/{Releasesetjobs.pm => ReleaseSetJobs.pm} (87%) rename src/Hydra/lib/Hydra/Schema/{Releasesets.pm => ReleaseSets.pm} (85%) rename src/Hydra/lib/Hydra/Schema/{Systemtypes.pm => SystemTypes.pm} (81%) rename src/Hydra/lib/Hydra/Schema/{Userroles.pm => UserRoles.pm} (84%) diff --git a/src/Hydra/lib/Hydra/Controller/Root.pm b/src/Hydra/lib/Hydra/Controller/Root.pm index e12e7921..2e34752a 100644 --- a/src/Hydra/lib/Hydra/Controller/Root.pm +++ b/src/Hydra/lib/Hydra/Controller/Root.pm @@ -208,7 +208,7 @@ sub getReleaseSet { die "Project $projectName doesn't exist." if !defined $project; $c->stash->{curProject} = $project; - (my $releaseSet) = $c->model('DB::Releasesets')->find($projectName, $releaseSetName); + (my $releaseSet) = $c->model('DB::ReleaseSets')->find($projectName, $releaseSetName); die "Release set $releaseSetName doesn't exist." if !defined $releaseSet; $c->stash->{releaseSet} = $releaseSet; diff --git a/src/Hydra/lib/Hydra/Schema.pm b/src/Hydra/lib/Hydra/Schema.pm index 26703330..f44b533d 100644 --- a/src/Hydra/lib/Hydra/Schema.pm +++ b/src/Hydra/lib/Hydra/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1mThEkw3+RDcO37DQaKMYg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XUOZNYJWLcbWpHNpePDazA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildinputs.pm b/src/Hydra/lib/Hydra/Schema/BuildInputs.pm similarity index 92% rename from src/Hydra/lib/Hydra/Schema/Buildinputs.pm rename to src/Hydra/lib/Hydra/Schema/BuildInputs.pm index 63e6b2b7..9d5cfe17 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildInputs.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Buildinputs; +package Hydra::Schema::BuildInputs; use strict; use warnings; @@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); __PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mm8nqCVrUNaV+QbK9xDYpw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p7rmvFgJAx+g7z5F7ecVVg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildproducts.pm b/src/Hydra/lib/Hydra/Schema/BuildProducts.pm similarity index 91% rename from src/Hydra/lib/Hydra/Schema/Buildproducts.pm rename to src/Hydra/lib/Hydra/Schema/BuildProducts.pm index 0fe1a61b..7d77a336 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildproducts.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildProducts.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Buildproducts; +package Hydra::Schema::BuildProducts; use strict; use warnings; @@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JlRwZ3f5MO3NKdiUoKdPHg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OJQ5uOiLpUxyUyAJtcZq7Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm b/src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm similarity index 90% rename from src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm rename to src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm index 476dfb2e..d334fdd7 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildResultInfo.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Buildresultinfo; +package Hydra::Schema::BuildResultInfo; use strict; use warnings; @@ -31,8 +31,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9rMPnerkNMCnmIcZsfvyXA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RXmEtQbYM1TJCsqGGbAnHA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm b/src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm similarity index 88% rename from src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm rename to src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm index 8b5cda54..3564dace 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildSchedulingInfo.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Buildschedulinginfo; +package Hydra::Schema::BuildSchedulingInfo; use strict; use warnings; @@ -27,8 +27,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h/lbs6oEwvoAcY6LizWv0w +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mwZi4xhp9c5uZPp0LJcW/w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildsteps.pm b/src/Hydra/lib/Hydra/Schema/BuildSteps.pm similarity index 91% rename from src/Hydra/lib/Hydra/Schema/Buildsteps.pm rename to src/Hydra/lib/Hydra/Schema/BuildSteps.pm index f5340b05..e8b69676 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildsteps.pm +++ b/src/Hydra/lib/Hydra/Schema/BuildSteps.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Buildsteps; +package Hydra::Schema::BuildSteps; use strict; use warnings; @@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o/Z/w60KRyJelArjR0PSfg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mPYFEGY2OMsfRQDIcp7KMw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Builds.pm b/src/Hydra/lib/Hydra/Schema/Builds.pm index c2269078..e6aa5957 100644 --- a/src/Hydra/lib/Hydra/Schema/Builds.pm +++ b/src/Hydra/lib/Hydra/Schema/Builds.pm @@ -44,54 +44,54 @@ __PACKAGE__->belongs_to( ); __PACKAGE__->has_many( "buildschedulinginfoes", - "Hydra::Schema::Buildschedulinginfo", + "Hydra::Schema::BuildSchedulingInfo", { "foreign.id" => "self.id" }, ); __PACKAGE__->has_many( "buildresultinfoes", - "Hydra::Schema::Buildresultinfo", + "Hydra::Schema::BuildResultInfo", { "foreign.id" => "self.id" }, ); __PACKAGE__->has_many( "buildsteps", - "Hydra::Schema::Buildsteps", + "Hydra::Schema::BuildSteps", { "foreign.id" => "self.id" }, ); __PACKAGE__->has_many( "buildinputs_builds", - "Hydra::Schema::Buildinputs", + "Hydra::Schema::BuildInputs", { "foreign.build" => "self.id" }, ); __PACKAGE__->has_many( "buildinputs_dependencies", - "Hydra::Schema::Buildinputs", + "Hydra::Schema::BuildInputs", { "foreign.dependency" => "self.id" }, ); __PACKAGE__->has_many( "buildproducts", - "Hydra::Schema::Buildproducts", + "Hydra::Schema::BuildProducts", { "foreign.build" => "self.id" }, ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+1cH3km/2qF9kVXzvuLCpQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OLYzmcCXrq4g1ja5mFS1uA -__PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); +__PACKAGE__->has_many(dependents => 'Hydra::Schema::BuildInputs', 'dependency'); __PACKAGE__->many_to_many(dependentBuilds => 'dependents', 'build'); -__PACKAGE__->has_many(inputs => 'Hydra::Schema::Buildinputs', 'build'); +__PACKAGE__->has_many(inputs => 'Hydra::Schema::BuildInputs', 'build'); __PACKAGE__->belongs_to( "schedulingInfo", - "Hydra::Schema::Buildschedulinginfo", + "Hydra::Schema::BuildSchedulingInfo", { id => "id" }, ); __PACKAGE__->belongs_to( "resultInfo", - "Hydra::Schema::Buildresultinfo", + "Hydra::Schema::BuildResultInfo", { id => "id" }, ); diff --git a/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm b/src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm similarity index 86% rename from src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm rename to src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm index 9c3332a6..1ebeb237 100644 --- a/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/CachedPathInputs.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Cachedpathinputs; +package Hydra::Schema::CachedPathInputs; use strict; use warnings; @@ -22,8 +22,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("srcpath", "sha256hash"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dxVJXTU+q0fJeFyrBqvlDg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uF9YsqaK0c9U4lSSMcWPQg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm b/src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm similarity index 84% rename from src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm rename to src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm index a9d9aae7..9ee8fe9e 100644 --- a/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm +++ b/src/Hydra/lib/Hydra/Schema/CachedSubversionInputs.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Cachedsubversioninputs; +package Hydra::Schema::CachedSubversionInputs; use strict; use warnings; @@ -20,8 +20,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("uri", "revision"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bx9lxEE8q+tuDk2XTiSsuQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KGF9+q9XvPhsJw/Fl6aTqg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm b/src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm similarity index 86% rename from src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm rename to src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm index 0b52fd29..1892209a 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm +++ b/src/Hydra/lib/Hydra/Schema/JobsetInputAlts.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Jobsetinputalts; +package Hydra::Schema::JobsetInputAlts; use strict; use warnings; @@ -26,13 +26,13 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("project", "jobset", "input", "altnr"); __PACKAGE__->belongs_to( "jobsetinput", - "Hydra::Schema::Jobsetinputs", + "Hydra::Schema::JobsetInputs", { jobset => "jobset", name => "input", project => "project" }, ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rATCecNYPIL+G9vO6eifqw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Q3wBn9LdHsDDkQ1rgFgfSA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm b/src/Hydra/lib/Hydra/Schema/JobsetInputs.pm similarity index 88% rename from src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm rename to src/Hydra/lib/Hydra/Schema/JobsetInputs.pm index eb7e7267..0643e716 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/JobsetInputs.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Jobsetinputs; +package Hydra::Schema::JobsetInputs; use strict; use warnings; @@ -34,7 +34,7 @@ __PACKAGE__->belongs_to( ); __PACKAGE__->has_many( "jobsetinputalts", - "Hydra::Schema::Jobsetinputalts", + "Hydra::Schema::JobsetInputAlts", { "foreign.input" => "self.name", "foreign.jobset" => "self.jobset", @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5AFlwVcHyenI+IwaxiZgMA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Zq2Y5b6Mu3Lh5xc3c+YMhA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsets.pm b/src/Hydra/lib/Hydra/Schema/Jobsets.pm index 7fa672f1..7a60591d 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsets.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsets.pm @@ -37,12 +37,12 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); __PACKAGE__->belongs_to( "jobsetinput", - "Hydra::Schema::Jobsetinputs", + "Hydra::Schema::JobsetInputs", { job => "name", name => "nixexprinput", project => "project" }, ); __PACKAGE__->has_many( "jobsetinputs", - "Hydra::Schema::Jobsetinputs", + "Hydra::Schema::JobsetInputs", { "foreign.jobset" => "self.name", "foreign.project" => "self.project", @@ -50,8 +50,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:suzwQtkvBtH9i3i7fkNObA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tzPEPlQXvjE7XzmjTkQ97A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Projects.pm b/src/Hydra/lib/Hydra/Schema/Projects.pm index b05cb821..41f62660 100644 --- a/src/Hydra/lib/Hydra/Schema/Projects.pm +++ b/src/Hydra/lib/Hydra/Schema/Projects.pm @@ -33,18 +33,18 @@ __PACKAGE__->has_many( ); __PACKAGE__->has_many( "releasesets", - "Hydra::Schema::Releasesets", + "Hydra::Schema::ReleaseSets", { "foreign.project" => "self.name" }, ); __PACKAGE__->has_many( "releasesetjobs", - "Hydra::Schema::Releasesetjobs", + "Hydra::Schema::ReleaseSetJobs", { "foreign.project" => "self.name" }, ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+IOm0ORfmn7N/ujS8axubw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VErTJlFT79ncSgQRHbxRBg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm b/src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm similarity index 87% rename from src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm rename to src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm index 143f9f39..056e8006 100644 --- a/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm +++ b/src/Hydra/lib/Hydra/Schema/ReleaseSetJobs.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Releasesetjobs; +package Hydra::Schema::ReleaseSetJobs; use strict; use warnings; @@ -27,13 +27,13 @@ __PACKAGE__->set_primary_key("project", "release", "job", "attrs"); __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); __PACKAGE__->belongs_to( "releaseset", - "Hydra::Schema::Releasesets", + "Hydra::Schema::ReleaseSets", { name => "release", project => "project" }, ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EA4dBRNNk3CgUVosyClVUQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vvPlit6ptYgp5wubWQOnbA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Releasesets.pm b/src/Hydra/lib/Hydra/Schema/ReleaseSets.pm similarity index 85% rename from src/Hydra/lib/Hydra/Schema/Releasesets.pm rename to src/Hydra/lib/Hydra/Schema/ReleaseSets.pm index 98c80bb7..1e062780 100644 --- a/src/Hydra/lib/Hydra/Schema/Releasesets.pm +++ b/src/Hydra/lib/Hydra/Schema/ReleaseSets.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Releasesets; +package Hydra::Schema::ReleaseSets; use strict; use warnings; @@ -21,7 +21,7 @@ __PACKAGE__->set_primary_key("project", "name"); __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); __PACKAGE__->has_many( "releasesetjobs", - "Hydra::Schema::Releasesetjobs", + "Hydra::Schema::ReleaseSetJobs", { "foreign.project" => "self.project", "foreign.release" => "self.name", @@ -29,8 +29,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uNeiMopmw7TNICoiL0ttaA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z/OOijrjmVRCC4FYZL8qFA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Systemtypes.pm b/src/Hydra/lib/Hydra/Schema/SystemTypes.pm similarity index 81% rename from src/Hydra/lib/Hydra/Schema/Systemtypes.pm rename to src/Hydra/lib/Hydra/Schema/SystemTypes.pm index 584b451a..0a648139 100644 --- a/src/Hydra/lib/Hydra/Schema/Systemtypes.pm +++ b/src/Hydra/lib/Hydra/Schema/SystemTypes.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Systemtypes; +package Hydra::Schema::SystemTypes; use strict; use warnings; @@ -16,8 +16,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("system"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5CNlTPCvcuXjTyoYCitBQg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t6mZU62241XET+vQ5X87cw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Userroles.pm b/src/Hydra/lib/Hydra/Schema/UserRoles.pm similarity index 84% rename from src/Hydra/lib/Hydra/Schema/Userroles.pm rename to src/Hydra/lib/Hydra/Schema/UserRoles.pm index af2e3c8f..78320259 100644 --- a/src/Hydra/lib/Hydra/Schema/Userroles.pm +++ b/src/Hydra/lib/Hydra/Schema/UserRoles.pm @@ -1,4 +1,4 @@ -package Hydra::Schema::Userroles; +package Hydra::Schema::UserRoles; use strict; use warnings; @@ -17,8 +17,8 @@ __PACKAGE__->set_primary_key("username", "role"); __PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hXmj8AaIhROVYgDJdV+N9A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Qvo2+AyVdqY8ML6dVJ8Mxg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Users.pm b/src/Hydra/lib/Hydra/Schema/Users.pm index be18d809..3746bde8 100644 --- a/src/Hydra/lib/Hydra/Schema/Users.pm +++ b/src/Hydra/lib/Hydra/Schema/Users.pm @@ -25,13 +25,13 @@ __PACKAGE__->has_many( ); __PACKAGE__->has_many( "userroles", - "Hydra::Schema::Userroles", + "Hydra::Schema::UserRoles", { "foreign.username" => "self.username" }, ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UTOV3gdmXWEm8S9RIytA0A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 17:19:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jUowQgo9F2lJRmdtu4PLQA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/script/hydra_build.pl b/src/Hydra/script/hydra_build.pl index d5a8d258..880ef363 100755 --- a/src/Hydra/script/hydra_build.pl +++ b/src/Hydra/script/hydra_build.pl @@ -53,7 +53,7 @@ sub doBuild { if (/^@\s+build-started\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/) { $db->txn_do(sub { - $db->resultset('Buildsteps')->create( + $db->resultset('BuildSteps')->create( { id => $build->id , stepnr => $buildStepNr++ , type => 0 # = build @@ -69,7 +69,7 @@ sub doBuild { elsif (/^@\s+build-succeeded\s+(\S+)\s+(\S+)$/) { my $drvPath = $1; $db->txn_do(sub { - (my $step) = $db->resultset('Buildsteps')->search( + (my $step) = $db->resultset('BuildSteps')->search( {id => $build->id, type => 0, drvpath => $drvPath}, {}); die unless $step; $step->busy(0); @@ -84,7 +84,7 @@ sub doBuild { $someBuildFailed = 1; $thisBuildFailed = 1 if $drvPath eq $drvPathStep; $db->txn_do(sub { - (my $step) = $db->resultset('Buildsteps')->search( + (my $step) = $db->resultset('BuildSteps')->search( {id => $build->id, type => 0, drvpath => $drvPathStep}, {}); if ($step) { die unless $step; @@ -94,7 +94,7 @@ sub doBuild { $step->stoptime(time); $step->update; } else { - $db->resultset('Buildsteps')->create( + $db->resultset('BuildSteps')->create( { id => $build->id , stepnr => $buildStepNr++ , type => 0 # = build @@ -114,7 +114,7 @@ sub doBuild { elsif (/^@\s+substituter-started\s+(\S+)\s+(\S+)$/) { my $outPath = $1; $db->txn_do(sub { - $db->resultset('Buildsteps')->create( + $db->resultset('BuildSteps')->create( { id => $build->id , stepnr => $buildStepNr++ , type => 1 # = substitution @@ -128,7 +128,7 @@ sub doBuild { elsif (/^@\s+substituter-succeeded\s+(\S+)$/) { my $outPath = $1; $db->txn_do(sub { - (my $step) = $db->resultset('Buildsteps')->search( + (my $step) = $db->resultset('BuildSteps')->search( {id => $build->id, type => 1, outpath => $outPath}, {}); die unless $step; $step->busy(0); @@ -141,7 +141,7 @@ sub doBuild { elsif (/^@\s+substituter-failed\s+(\S+)\s+(\S+)\s+(\S+)$/) { my $outPath = $1; $db->txn_do(sub { - (my $step) = $db->resultset('Buildsteps')->search( + (my $step) = $db->resultset('BuildSteps')->search( {id => $build->id, type => 1, outpath => $outPath}, {}); die unless $step; $step->busy(0); @@ -189,7 +189,7 @@ sub doBuild { close FILE; } - $db->resultset('Buildresultinfo')->create( + $db->resultset('BuildResultInfo')->create( { id => $build->id , iscachedbuild => $isCachedBuild , buildstatus => $buildStatus @@ -228,7 +228,7 @@ sub doBuild { chomp $sha256; } - $db->resultset('Buildproducts')->create( + $db->resultset('BuildProducts')->create( { build => $build->id , productnr => $productnr++ , type => $type @@ -244,7 +244,7 @@ sub doBuild { } else { - $db->resultset('Buildproducts')->create( + $db->resultset('BuildProducts')->create( { build => $build->id , productnr => $productnr++ , type => "nix-build" diff --git a/src/Hydra/script/hydra_queue_runner.pl b/src/Hydra/script/hydra_queue_runner.pl index 6e302085..24c03a76 100755 --- a/src/Hydra/script/hydra_queue_runner.pl +++ b/src/Hydra/script/hydra_queue_runner.pl @@ -72,7 +72,7 @@ sub checkBuilds { {join => 'schedulingInfo'})->count; # How many extra builds can we start? - (my $systemTypeInfo) = $db->resultset('Systemtypes')->search({system => $system->system}); + (my $systemTypeInfo) = $db->resultset('SystemTypes')->search({system => $system->system}); my $maxConcurrent = defined $systemTypeInfo ? $systemTypeInfo->maxconcurrent : 2; my $extraAllowed = $maxConcurrent - $nrActive; $extraAllowed = 0 if $extraAllowed < 0; diff --git a/src/Hydra/script/hydra_scheduler.pl b/src/Hydra/script/hydra_scheduler.pl index 80f5fae6..4197bfd1 100755 --- a/src/Hydra/script/hydra_scheduler.pl +++ b/src/Hydra/script/hydra_scheduler.pl @@ -44,7 +44,7 @@ sub fetchInput { my $storePath; # Some simple caching: don't check a path more than once every N seconds. - (my $cachedInput) = $db->resultset('Cachedpathinputs')->search( + (my $cachedInput) = $db->resultset('CachedPathInputs')->search( {srcpath => $uri, lastseen => {">", $timestamp - 60}}, {rows => 1, order_by => "lastseen DESC"}); @@ -61,7 +61,7 @@ sub fetchInput { $sha256 = getStorePathHash $storePath; - ($cachedInput) = $db->resultset('Cachedpathinputs')->search( + ($cachedInput) = $db->resultset('CachedPathInputs')->search( {srcpath => $uri, sha256hash => $sha256}); # Path inputs don't have a natural notion of a "revision", @@ -72,7 +72,7 @@ sub fetchInput { # a new "revision". if (!defined $cachedInput) { $db->txn_do(sub { - $db->resultset('Cachedpathinputs')->create( + $db->resultset('CachedPathInputs')->create( { srcpath => $uri , timestamp => $timestamp , lastseen => $timestamp @@ -113,7 +113,7 @@ sub fetchInput { my $revision = $stdout; chomp $revision; die unless $revision =~ /^\d+$/; - (my $cachedInput) = $db->resultset('Cachedsubversioninputs')->search( + (my $cachedInput) = $db->resultset('CachedSubversionInputs')->search( {uri => $uri, revision => $revision}); if (defined $cachedInput && isValidPath($cachedInput->storepath)) { @@ -132,7 +132,7 @@ sub fetchInput { ($sha256, $storePath) = split ' ', $stdout; $db->txn_do(sub { - $db->resultset('Cachedsubversioninputs')->create( + $db->resultset('CachedSubversionInputs')->create( { uri => $uri , revision => $revision , sha256hash => $sha256 @@ -227,7 +227,7 @@ sub checkJob { , system => $job->{system} }); - $db->resultset('Buildschedulinginfo')->create( + $db->resultset('BuildSchedulingInfo')->create( { id => $build->id , priority => $priority , busy => 0 @@ -236,7 +236,7 @@ sub checkJob { foreach my $inputName (keys %{$inputInfo}) { my $input = $inputInfo->{$inputName}; - $db->resultset('Buildinputs')->create( + $db->resultset('BuildInputs')->create( { build => $build->id , name => $inputName , type => $input->{type}