hydra/src/lib/Hydra/Schema/BuildInputs.pm

122 lines
2.2 KiB
Perl
Raw Normal View History

package Hydra::Schema::BuildInputs;
use strict;
use warnings;
use base 'DBIx::Class';
__PACKAGE__->load_components("Core");
2008-11-11 12:54:37 +00:00
__PACKAGE__->table("BuildInputs");
__PACKAGE__->add_columns(
2008-11-09 00:48:36 +00:00
"id",
{
data_type => "integer",
default_value => undef,
is_nullable => 0,
size => undef,
},
2008-11-09 00:48:36 +00:00
"build",
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 1,
size => undef,
},
"name",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"type",
{
data_type => "text",
default_value => undef,
is_nullable => 0,
size => undef,
},
"uri",
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
"revision",
{
data_type => "integer",
default_value => undef,
is_nullable => 1,
size => undef,
},
"tag",
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
2008-11-09 00:48:36 +00:00
"value",
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
2008-11-09 00:48:36 +00:00
"dependency",
{
data_type => "integer",
default_value => undef,
is_foreign_key => 1,
is_nullable => 1,
size => undef,
},
"path",
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
2008-11-12 23:14:57 +00:00
"sha256hash",
{
data_type => "text",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
2008-11-09 00:48:36 +00:00
__PACKAGE__->set_primary_key("id");
__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-10-21 14:17:55
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7blxTiVkvfdukDiXCoD+Lw
use Hydra::Helper::Nix;
2009-05-11 13:56:52 +00:00
sub addSequence {
my $hydradbi = getHydraDBPath ;
if ($hydradbi =~ m/^dbi:Pg/) {
__PACKAGE__->sequence('builds_id_seq');
}
}
addSequence ;
2008-11-11 12:54:37 +00:00
# You can replace this text with custom content, and it will be preserved on regeneration
1;