X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fdb-idempotent-populate;h=b44d45dd25cc7d63c435059c521bfc0b84a36800;hb=35dc4e063467490048e83f1d9d519cd3652d870e;hp=80ded466aefeb4ab89899fae5218dd7da2537e72;hpb=4e2f1b2a9105cd228da52e2e8a173cf6eb4bcb71;p=ypp-sc-tools.main.git diff --git a/yarrg/db-idempotent-populate b/yarrg/db-idempotent-populate index 80ded46..b44d45d 100755 --- a/yarrg/db-idempotent-populate +++ b/yarrg/db-idempotent-populate @@ -1,5 +1,8 @@ #!/usr/bin/perl -w # +# Normally run from +# update-master-info +# # usage: ./db-idempotent-populate # creates or updates OCEAN-Oceanname.db # from master-master.txt @@ -120,6 +123,8 @@ END ; foreach my $commod (sort keys %commods) { my $c= $commods{$commod}; + die "no mass for $commod" unless defined $c->{Mass}; + die "no colume for $commod" unless defined $c->{Volume}; my @qa= ($c->{Mass}, $c->{Volume}, $commod); $insert->execute(@qa); $update->execute(@qa);