X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=yarrg%2Fdb-idempotent-populate;h=b44d45dd25cc7d63c435059c521bfc0b84a36800;hp=80ded466aefeb4ab89899fae5218dd7da2537e72;hb=bd155443745759a5a9c95cd1cbce5a8f73894737;hpb=fceed60843f6a7c037b908eb529b542ad263c500 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);