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:
@ -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 = ?");
|
||||
|
Reference in New Issue
Block a user