forked from lix-project/hydra
Merge pull request #762 from knl/fix-declarative-jobset-missing-type-value
Fix declarative jobset missing type value
This commit is contained in:
commit
03f14f46d7
|
@ -43,6 +43,8 @@ sub updateDeclarativeJobset {
|
||||||
);
|
);
|
||||||
my %update = ( name => $jobsetName );
|
my %update = ( name => $jobsetName );
|
||||||
foreach my $key (@allowed_keys) {
|
foreach my $key (@allowed_keys) {
|
||||||
|
# do not pass missing data to let psql assign the default value
|
||||||
|
next unless defined $declSpec->{$key};
|
||||||
$update{$key} = $declSpec->{$key};
|
$update{$key} = $declSpec->{$key};
|
||||||
delete $declSpec->{$key};
|
delete $declSpec->{$key};
|
||||||
}
|
}
|
||||||
|
|
2
src/sql/upgrade-66.sql
Normal file
2
src/sql/upgrade-66.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
update Jobsets set type = 0 where type is null;
|
||||||
|
alter table Jobsets alter column type set not null;
|
Loading…
Reference in a new issue