2011-12-05 14:29:29 +01:00
|
|
|
use utf8;
|
2021-08-26 12:03:00 -04:00
|
|
|
package Hydra::Schema::Result::Builds;
|
2008-10-28 10:19:31 +00:00
|
|
|
|
2009-10-23 15:05:16 +00:00
|
|
|
# Created by DBIx::Class::Schema::Loader
|
|
|
|
# DO NOT MODIFY THE FIRST PART OF THIS FILE
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head1 NAME
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Hydra::Schema::Result::Builds
|
2011-12-05 14:29:29 +01:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2008-10-28 10:19:31 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2010-02-25 09:50:04 +00:00
|
|
|
use base 'DBIx::Class::Core';
|
|
|
|
|
2013-06-17 12:34:21 -04:00
|
|
|
=head1 COMPONENTS LOADED
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item * L<Hydra::Component::ToJSON>
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->load_components("+Hydra::Component::ToJSON");
|
|
|
|
|
2020-02-06 12:23:47 -05:00
|
|
|
=head1 TABLE: C<builds>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
2008-10-28 10:19:31 +00:00
|
|
|
|
2020-02-06 12:23:47 -05:00
|
|
|
__PACKAGE__->table("builds");
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=head1 ACCESSORS
|
|
|
|
|
|
|
|
=head2 id
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'integer'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_auto_increment: 1
|
|
|
|
is_nullable: 0
|
2020-02-06 12:23:47 -05:00
|
|
|
sequence: 'builds_id_seq'
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=head2 finished
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'integer'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 0
|
|
|
|
|
|
|
|
=head2 timestamp
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'integer'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 0
|
|
|
|
|
|
|
|
=head2 project
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_foreign_key: 1
|
|
|
|
is_nullable: 0
|
|
|
|
|
|
|
|
=head2 jobset
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_foreign_key: 1
|
|
|
|
is_nullable: 0
|
|
|
|
|
2020-02-05 15:11:56 -05:00
|
|
|
=head2 jobset_id
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
is_foreign_key: 1
|
2020-02-05 15:25:52 -05:00
|
|
|
is_nullable: 0
|
2020-02-05 15:11:56 -05:00
|
|
|
|
2010-02-25 09:50:04 +00:00
|
|
|
=head2 job
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 0
|
|
|
|
|
|
|
|
=head2 nixname
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 description
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 drvpath
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 0
|
|
|
|
|
|
|
|
=head2 system
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 0
|
|
|
|
|
|
|
|
=head2 license
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 homepage
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 maintainers
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'text'
|
2010-02-25 09:50:04 +00:00
|
|
|
is_nullable: 1
|
|
|
|
|
2010-05-26 08:03:59 +00:00
|
|
|
=head2 maxsilent
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'integer'
|
2010-05-26 08:03:59 +00:00
|
|
|
default_value: 3600
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 timeout
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'integer'
|
2010-05-26 08:03:59 +00:00
|
|
|
default_value: 36000
|
|
|
|
is_nullable: 1
|
|
|
|
|
2015-04-21 07:45:50 +02:00
|
|
|
=head2 ischannel
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
default_value: 0
|
2015-10-27 15:37:17 +01:00
|
|
|
is_nullable: 0
|
2015-04-21 07:45:50 +02:00
|
|
|
|
2010-02-25 09:50:04 +00:00
|
|
|
=head2 iscurrent
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
data_type: 'integer'
|
2010-02-25 09:50:04 +00:00
|
|
|
default_value: 0
|
|
|
|
is_nullable: 1
|
|
|
|
|
2012-02-29 02:22:49 +01:00
|
|
|
=head2 priority
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
default_value: 0
|
|
|
|
is_nullable: 0
|
|
|
|
|
2015-08-10 16:18:06 +02:00
|
|
|
=head2 globalpriority
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
default_value: 0
|
|
|
|
is_nullable: 0
|
|
|
|
|
2012-02-29 02:22:49 +01:00
|
|
|
=head2 starttime
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
is_nullable: 1
|
|
|
|
|
2012-03-05 21:52:47 +01:00
|
|
|
=head2 stoptime
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 iscachedbuild
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 buildstatus
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 size
|
|
|
|
|
|
|
|
data_type: 'bigint'
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 closuresize
|
|
|
|
|
|
|
|
data_type: 'bigint'
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 releasename
|
|
|
|
|
|
|
|
data_type: 'text'
|
|
|
|
is_nullable: 1
|
|
|
|
|
|
|
|
=head2 keep
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
default_value: 0
|
|
|
|
is_nullable: 0
|
|
|
|
|
2019-08-19 17:05:11 +02:00
|
|
|
=head2 notificationpendingsince
|
|
|
|
|
|
|
|
data_type: 'integer'
|
|
|
|
is_nullable: 1
|
|
|
|
|
2010-02-25 09:50:04 +00:00
|
|
|
=cut
|
|
|
|
|
2008-10-28 10:19:31 +00:00
|
|
|
__PACKAGE__->add_columns(
|
|
|
|
"id",
|
2020-02-06 12:23:47 -05:00
|
|
|
{
|
|
|
|
data_type => "integer",
|
|
|
|
is_auto_increment => 1,
|
|
|
|
is_nullable => 0,
|
|
|
|
sequence => "builds_id_seq",
|
|
|
|
},
|
2008-11-11 12:54:37 +00:00
|
|
|
"finished",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "integer", is_nullable => 0 },
|
2008-10-28 10:19:31 +00:00
|
|
|
"timestamp",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "integer", is_nullable => 0 },
|
2008-11-04 18:23:28 +00:00
|
|
|
"project",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
|
2008-11-04 18:23:28 +00:00
|
|
|
"jobset",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_foreign_key => 1, is_nullable => 0 },
|
2020-02-05 15:11:56 -05:00
|
|
|
"jobset_id",
|
2020-02-05 15:25:52 -05:00
|
|
|
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
|
2009-03-12 14:18:30 +00:00
|
|
|
"job",
|
2020-05-27 20:09:36 +02:00
|
|
|
{ data_type => "text", is_nullable => 0 },
|
2008-11-12 16:42:07 +00:00
|
|
|
"nixname",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 1 },
|
2008-10-28 10:19:31 +00:00
|
|
|
"description",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 1 },
|
2008-10-28 10:19:31 +00:00
|
|
|
"drvpath",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 0 },
|
2008-11-06 18:26:29 +00:00
|
|
|
"system",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 0 },
|
2008-12-16 15:09:39 +00:00
|
|
|
"license",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 1 },
|
2009-03-04 14:49:21 +00:00
|
|
|
"homepage",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 1 },
|
2009-07-07 13:59:59 +00:00
|
|
|
"maintainers",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "text", is_nullable => 1 },
|
2010-05-26 08:03:59 +00:00
|
|
|
"maxsilent",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "integer", default_value => 3600, is_nullable => 1 },
|
2010-05-26 08:03:59 +00:00
|
|
|
"timeout",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "integer", default_value => 36000, is_nullable => 1 },
|
2015-04-21 07:45:50 +02:00
|
|
|
"ischannel",
|
2015-10-27 15:37:17 +01:00
|
|
|
{ data_type => "integer", default_value => 0, is_nullable => 0 },
|
2009-10-02 16:06:28 +00:00
|
|
|
"iscurrent",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ data_type => "integer", default_value => 0, is_nullable => 1 },
|
2012-02-29 02:22:49 +01:00
|
|
|
"priority",
|
|
|
|
{ data_type => "integer", default_value => 0, is_nullable => 0 },
|
2015-08-10 16:18:06 +02:00
|
|
|
"globalpriority",
|
|
|
|
{ data_type => "integer", default_value => 0, is_nullable => 0 },
|
2012-02-29 02:22:49 +01:00
|
|
|
"starttime",
|
|
|
|
{ data_type => "integer", is_nullable => 1 },
|
2012-03-05 21:52:47 +01:00
|
|
|
"stoptime",
|
|
|
|
{ data_type => "integer", is_nullable => 1 },
|
|
|
|
"iscachedbuild",
|
|
|
|
{ data_type => "integer", is_nullable => 1 },
|
|
|
|
"buildstatus",
|
|
|
|
{ data_type => "integer", is_nullable => 1 },
|
|
|
|
"size",
|
|
|
|
{ data_type => "bigint", is_nullable => 1 },
|
|
|
|
"closuresize",
|
|
|
|
{ data_type => "bigint", is_nullable => 1 },
|
|
|
|
"releasename",
|
|
|
|
{ data_type => "text", is_nullable => 1 },
|
|
|
|
"keep",
|
|
|
|
{ data_type => "integer", default_value => 0, is_nullable => 0 },
|
2019-08-19 17:05:11 +02:00
|
|
|
"notificationpendingsince",
|
|
|
|
{ data_type => "integer", is_nullable => 1 },
|
2008-10-28 10:19:31 +00:00
|
|
|
);
|
2011-12-05 14:29:29 +01:00
|
|
|
|
|
|
|
=head1 PRIMARY KEY
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item * L</id>
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2008-10-28 10:19:31 +00:00
|
|
|
__PACKAGE__->set_primary_key("id");
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=head1 RELATIONS
|
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
=head2 aggregateconstituents_aggregates
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::AggregateConstituents>
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
2013-08-15 02:33:10 +02:00
|
|
|
"aggregateconstituents_aggregates",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::AggregateConstituents",
|
2013-08-14 01:59:29 +02:00
|
|
|
{ "foreign.aggregate" => "self.id" },
|
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
=head2 aggregateconstituents_constituents
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::AggregateConstituents>
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
2013-08-15 02:33:10 +02:00
|
|
|
"aggregateconstituents_constituents",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::AggregateConstituents",
|
2013-08-15 02:33:10 +02:00
|
|
|
{ "foreign.constituent" => "self.id" },
|
2013-08-14 01:59:29 +02:00
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head2 buildinputs_builds
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
Type: has_many
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildInputs>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildinputs_builds",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildInputs",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ "foreign.build" => "self.id" },
|
2013-01-22 22:48:02 +01:00
|
|
|
undef,
|
2011-12-05 14:29:29 +01:00
|
|
|
);
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head2 buildinputs_dependencies
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
Type: has_many
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildInputs>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildinputs_dependencies",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildInputs",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ "foreign.dependency" => "self.id" },
|
2013-01-22 22:48:02 +01:00
|
|
|
undef,
|
2008-11-10 10:18:50 +00:00
|
|
|
);
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2015-07-31 00:57:30 +02:00
|
|
|
=head2 buildmetrics
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildMetrics>
|
2015-07-31 00:57:30 +02:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildmetrics",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildMetrics",
|
2015-07-31 00:57:30 +02:00
|
|
|
{ "foreign.build" => "self.id" },
|
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2013-02-13 16:49:28 +00:00
|
|
|
=head2 buildoutputs
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildOutputs>
|
2013-02-13 16:49:28 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildoutputs",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildOutputs",
|
2013-02-13 16:49:28 +00:00
|
|
|
{ "foreign.build" => "self.id" },
|
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head2 buildproducts
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
Type: has_many
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildProducts>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildproducts",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildProducts",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ "foreign.build" => "self.id" },
|
2013-01-22 22:48:02 +01:00
|
|
|
undef,
|
2009-03-13 14:49:25 +00:00
|
|
|
);
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2013-02-13 16:49:28 +00:00
|
|
|
=head2 buildstepoutputs
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildStepOutputs>
|
2013-02-13 16:49:28 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildstepoutputs",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildStepOutputs",
|
2013-02-13 16:49:28 +00:00
|
|
|
{ "foreign.build" => "self.id" },
|
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2010-02-25 09:50:04 +00:00
|
|
|
=head2 buildsteps
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildSteps>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2008-11-12 16:42:07 +00:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildsteps",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildSteps",
|
2009-03-12 14:18:30 +00:00
|
|
|
{ "foreign.build" => "self.id" },
|
2013-01-22 22:48:02 +01:00
|
|
|
undef,
|
2008-11-12 16:42:07 +00:00
|
|
|
);
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2015-07-30 16:07:21 +02:00
|
|
|
=head2 buildsteps_propagatedfroms
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::BuildSteps>
|
2015-07-30 16:07:21 +02:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"buildsteps_propagatedfroms",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildSteps",
|
2015-07-30 16:07:21 +02:00
|
|
|
{ "foreign.propagatedfrom" => "self.id" },
|
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head2 jobset
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
Type: belongs_to
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::Jobsets>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
__PACKAGE__->belongs_to(
|
|
|
|
"jobset",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::Jobsets",
|
2020-02-05 15:11:56 -05:00
|
|
|
{ id => "jobset_id" },
|
2020-02-05 15:25:52 -05:00
|
|
|
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
|
2020-02-05 15:11:56 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
=head2 jobset_project_jobset
|
|
|
|
|
|
|
|
Type: belongs_to
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::Jobsets>
|
2020-02-05 15:11:56 -05:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->belongs_to(
|
|
|
|
"jobset_project_jobset",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::Jobsets",
|
2011-12-05 14:29:29 +01:00
|
|
|
{ name => "jobset", project => "project" },
|
2013-01-22 22:48:02 +01:00
|
|
|
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "CASCADE" },
|
2008-11-11 12:54:37 +00:00
|
|
|
);
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2012-04-15 18:36:36 +00:00
|
|
|
=head2 jobsetevalinputs
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::JobsetEvalInputs>
|
2012-04-15 18:36:36 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"jobsetevalinputs",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::JobsetEvalInputs",
|
2012-04-15 18:36:36 +00:00
|
|
|
{ "foreign.dependency" => "self.id" },
|
2013-01-22 22:48:02 +01:00
|
|
|
undef,
|
2012-04-15 18:36:36 +00:00
|
|
|
);
|
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head2 jobsetevalmembers
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::JobsetEvalMembers>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2008-10-28 10:19:31 +00:00
|
|
|
__PACKAGE__->has_many(
|
2011-12-05 14:29:29 +01:00
|
|
|
"jobsetevalmembers",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::JobsetEvalMembers",
|
2008-11-09 00:48:36 +00:00
|
|
|
{ "foreign.build" => "self.id" },
|
2013-01-22 22:48:02 +01:00
|
|
|
undef,
|
2008-10-28 10:19:31 +00:00
|
|
|
);
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
=head2 project
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2011-12-05 14:29:29 +01:00
|
|
|
Type: belongs_to
|
2010-02-25 09:50:04 +00:00
|
|
|
|
2021-08-26 12:03:00 -04:00
|
|
|
Related object: L<Hydra::Schema::Result::Projects>
|
2010-02-25 09:50:04 +00:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2013-01-22 22:48:02 +01:00
|
|
|
__PACKAGE__->belongs_to(
|
|
|
|
"project",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::Projects",
|
2013-01-22 22:48:02 +01:00
|
|
|
{ name => "project" },
|
|
|
|
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "CASCADE" },
|
|
|
|
);
|
2008-10-28 10:19:31 +00:00
|
|
|
|
2021-11-17 12:34:50 -05:00
|
|
|
=head2 runcommandlogs
|
|
|
|
|
|
|
|
Type: has_many
|
|
|
|
|
|
|
|
Related object: L<Hydra::Schema::Result::RunCommandLogs>
|
|
|
|
|
|
|
|
=cut
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"runcommandlogs",
|
|
|
|
"Hydra::Schema::Result::RunCommandLogs",
|
|
|
|
{ "foreign.build_id" => "self.id" },
|
|
|
|
undef,
|
|
|
|
);
|
|
|
|
|
2013-08-14 01:59:29 +02:00
|
|
|
=head2 aggregates
|
|
|
|
|
|
|
|
Type: many_to_many
|
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
Composing rels: L</aggregateconstituents_constituents> -> aggregate
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
__PACKAGE__->many_to_many(
|
|
|
|
"aggregates",
|
|
|
|
"aggregateconstituents_constituents",
|
|
|
|
"aggregate",
|
|
|
|
);
|
2013-08-14 01:59:29 +02:00
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
=head2 constituents
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
Type: many_to_many
|
|
|
|
|
2015-07-30 16:07:21 +02:00
|
|
|
Composing rels: L</aggregateconstituents_aggregates> -> constituent
|
2013-08-14 01:59:29 +02:00
|
|
|
|
|
|
|
=cut
|
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
__PACKAGE__->many_to_many(
|
|
|
|
"constituents",
|
2015-07-30 16:07:21 +02:00
|
|
|
"aggregateconstituents_aggregates",
|
2013-08-15 02:33:10 +02:00
|
|
|
"constituent",
|
|
|
|
);
|
2013-08-14 01:59:29 +02:00
|
|
|
|
2010-03-05 15:41:10 +00:00
|
|
|
|
2021-11-17 12:34:50 -05:00
|
|
|
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-17 12:42:34
|
|
|
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ylttv/NTMDcSZumBXRCOCw
|
2008-11-11 12:54:37 +00:00
|
|
|
|
2009-07-07 13:59:59 +00:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"dependents",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildInputs",
|
2009-07-07 13:59:59 +00:00
|
|
|
{ "foreign.dependency" => "self.id" },
|
|
|
|
);
|
2008-10-28 10:19:31 +00:00
|
|
|
|
2008-11-27 15:16:06 +00:00
|
|
|
__PACKAGE__->many_to_many(dependentBuilds => 'dependents', 'build');
|
|
|
|
|
2009-07-07 13:59:59 +00:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
"inputs",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildInputs",
|
2009-07-07 13:59:59 +00:00
|
|
|
{ "foreign.build" => "self.id" },
|
|
|
|
);
|
2008-11-11 12:54:37 +00:00
|
|
|
|
2014-01-28 10:27:48 +00:00
|
|
|
__PACKAGE__->has_one(
|
|
|
|
"actualBuildStep",
|
2021-08-26 12:03:00 -04:00
|
|
|
"Hydra::Schema::Result::BuildSteps",
|
2014-01-28 10:27:48 +00:00
|
|
|
{ 'foreign.drvpath' => 'self.drvpath'
|
|
|
|
, 'foreign.build' => 'self.id'
|
|
|
|
},
|
|
|
|
);
|
2010-02-25 10:22:03 +00:00
|
|
|
|
2013-02-21 18:34:34 +01:00
|
|
|
__PACKAGE__->many_to_many("jobsetevals", "jobsetevalmembers", "eval");
|
|
|
|
|
2013-08-15 02:33:10 +02:00
|
|
|
__PACKAGE__->many_to_many("constituents_", "aggregateconstituents_aggregates", "constituent");
|
2013-08-15 00:30:19 +02:00
|
|
|
|
2009-04-03 15:37:21 +00:00
|
|
|
sub makeSource {
|
|
|
|
my ($name, $query) = @_;
|
|
|
|
my $source = __PACKAGE__->result_source_instance();
|
|
|
|
my $new_source = $source->new($source);
|
|
|
|
$new_source->source_name($name);
|
|
|
|
$new_source->name(\ "($query)");
|
|
|
|
Hydra::Schema->register_extra_source($name => $new_source);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub makeQueries {
|
|
|
|
my ($name, $constraint) = @_;
|
2013-01-22 14:41:02 +01:00
|
|
|
|
2022-01-09 09:46:20 -05:00
|
|
|
my $activeJobs = "(select distinct jobset_id, job, system from Builds where isCurrent = 1 $constraint)";
|
2009-10-07 15:45:17 +00:00
|
|
|
|
2009-10-07 13:40:58 +00:00
|
|
|
makeSource(
|
|
|
|
"LatestSucceeded$name",
|
|
|
|
<<QUERY
|
|
|
|
select *
|
|
|
|
from
|
2013-01-22 14:41:02 +01:00
|
|
|
(select
|
2012-02-29 02:22:49 +01:00
|
|
|
(select max(b.id) from builds b
|
2013-01-22 14:41:02 +01:00
|
|
|
where
|
2022-01-09 09:46:20 -05:00
|
|
|
jobset_id = activeJobs.jobset_id
|
2013-01-22 14:41:02 +01:00
|
|
|
and job = activeJobs.job and system = activeJobs.system
|
2012-03-05 21:52:47 +01:00
|
|
|
and finished = 1 and buildstatus = 0
|
2010-02-25 10:22:03 +00:00
|
|
|
) as id
|
2009-10-07 15:45:17 +00:00
|
|
|
from $activeJobs as activeJobs
|
2009-10-07 13:40:58 +00:00
|
|
|
) as latest
|
2010-02-25 10:22:03 +00:00
|
|
|
join Builds using (id)
|
2009-10-07 13:40:58 +00:00
|
|
|
QUERY
|
|
|
|
);
|
2009-04-03 15:37:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
makeQueries('', "");
|
2022-01-09 09:46:20 -05:00
|
|
|
makeQueries('ForProject', "and jobset_id in (select id from jobsets j where j.project = ?)");
|
2020-05-09 16:42:43 -04:00
|
|
|
makeQueries('ForJobset', "and jobset_id = ?");
|
|
|
|
makeQueries('ForJob', "and jobset_id = ? and job = ?");
|
2020-10-22 13:27:52 +02:00
|
|
|
makeQueries('ForJobName', "and jobset_id = (select id from jobsets j where j.name = ?) and job = ?");
|
2009-04-03 15:37:21 +00:00
|
|
|
|
2010-02-25 10:22:03 +00:00
|
|
|
|
2013-10-24 15:47:36 -04:00
|
|
|
my %hint = (
|
|
|
|
columns => [
|
2013-11-05 09:43:32 -05:00
|
|
|
'id',
|
|
|
|
'finished',
|
|
|
|
'timestamp',
|
2013-10-29 13:54:11 -04:00
|
|
|
'starttime',
|
2013-10-24 16:12:36 -04:00
|
|
|
'stoptime',
|
|
|
|
'project',
|
|
|
|
'jobset',
|
|
|
|
'job',
|
|
|
|
'nixname',
|
|
|
|
'system',
|
|
|
|
'priority',
|
|
|
|
'buildstatus',
|
2017-09-12 18:42:18 +02:00
|
|
|
'releasename',
|
|
|
|
'drvpath',
|
2013-10-29 14:41:48 -04:00
|
|
|
],
|
2015-09-02 12:57:58 +02:00
|
|
|
relations => {
|
|
|
|
jobsetevals => 'id'
|
|
|
|
},
|
2013-10-29 14:41:48 -04:00
|
|
|
eager_relations => {
|
2013-11-05 09:42:05 -05:00
|
|
|
buildoutputs => 'name',
|
|
|
|
buildproducts => 'productnr',
|
2015-07-31 00:57:30 +02:00
|
|
|
buildmetrics => 'name',
|
2013-10-29 14:41:48 -04:00
|
|
|
}
|
2013-10-24 15:47:36 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
sub json_hint {
|
|
|
|
return \%hint;
|
|
|
|
}
|
|
|
|
|
2008-10-28 10:19:31 +00:00
|
|
|
1;
|