chiark / gitweb /
master-info sanitiser. master-info is now renamed source-info
[ypp-sc-tools.db-test.git] / yarrg / db-idempotent-populate
index 80ded466aefeb4ab89899fae5218dd7da2537e72..b44d45dd25cc7d63c435059c521bfc0b84a36800 100755 (executable)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 #
+# Normally run from
+#  update-master-info
+#
 # usage: ./db-idempotent-populate <Oceanname>
 #  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);