Open the DB using Hydra::Model::DB->new
This gets rid of the openHydraDB function and ensures that we open the database in a consistent way. Also drop the PostgreSQL sequence hacks. They don't seem to be necessary anymore.
This commit is contained in:
@ -156,16 +156,4 @@ __PACKAGE__->belongs_to(
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yaqa9gcGx9Z+Nfr3xgX28g
|
||||
|
||||
use Hydra::Helper::Nix;
|
||||
|
||||
sub addSequence {
|
||||
my $hydradbi = getHydraDBPath ;
|
||||
if ($hydradbi =~ m/^dbi:Pg/) {
|
||||
__PACKAGE__->sequence('builds_id_seq');
|
||||
}
|
||||
}
|
||||
|
||||
addSequence ;
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
1;
|
||||
|
@ -432,8 +432,6 @@ __PACKAGE__->has_many(
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-29 18:56:22
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w16c86FRReLPdA8H0yTIRg
|
||||
|
||||
use Hydra::Helper::Nix;
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"dependents",
|
||||
"Hydra::Schema::BuildInputs",
|
||||
@ -456,13 +454,6 @@ __PACKAGE__->has_one(
|
||||
},
|
||||
);
|
||||
|
||||
sub addSequence {
|
||||
my $hydradbi = getHydraDBPath;
|
||||
if ($hydradbi =~ m/^dbi:Pg/) {
|
||||
__PACKAGE__->sequence('builds_id_seq');
|
||||
}
|
||||
}
|
||||
|
||||
sub makeSource {
|
||||
my ($name, $query) = @_;
|
||||
my $source = __PACKAGE__->result_source_instance();
|
||||
@ -526,8 +517,6 @@ QUERY
|
||||
);
|
||||
}
|
||||
|
||||
addSequence;
|
||||
|
||||
makeQueries('', "");
|
||||
makeQueries('ForProject', "and project = ?");
|
||||
makeQueries('ForJobset', "and project = ? and jobset = ?");
|
||||
|
@ -145,14 +145,6 @@ __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eQtF5bcR/qZ625LxWBc7ug
|
||||
|
||||
use Hydra::Helper::Nix;
|
||||
|
||||
# !!! Ugly, should be generated.
|
||||
my $hydradbi = getHydraDBPath;
|
||||
if ($hydradbi =~ m/^dbi:Pg/) {
|
||||
__PACKAGE__->sequence('jobsetevals_id_seq');
|
||||
}
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"buildIds",
|
||||
"Hydra::Schema::JobsetEvalMembers",
|
||||
|
@ -86,12 +86,4 @@ __PACKAGE__->belongs_to("author", "Hydra::Schema::Users", { username => "author"
|
||||
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YRMh0QI4JezFLj7nywGu6Q
|
||||
|
||||
use Hydra::Helper::Nix;
|
||||
|
||||
# !!! Ugly, should be generated.
|
||||
my $hydradbi = getHydraDBPath;
|
||||
if ($hydradbi =~ m/^dbi:Pg/) {
|
||||
__PACKAGE__->sequence('newsitems_id_seq');
|
||||
}
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user