chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'stable-3.x'
[ypp-sc-tools.db-live.git]
/
yarrg
/
db-idempotent-populate
diff --git
a/yarrg/db-idempotent-populate
b/yarrg/db-idempotent-populate
index 80ded466aefeb4ab89899fae5218dd7da2537e72..b44d45dd25cc7d63c435059c521bfc0b84a36800 100755
(executable)
--- a/
yarrg/db-idempotent-populate
+++ b/
yarrg/db-idempotent-populate
@@
-1,5
+1,8
@@
#!/usr/bin/perl -w
#
#!/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
# 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};
;
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);
my @qa= ($c->{Mass}, $c->{Volume}, $commod);
$insert->execute(@qa);
$update->execute(@qa);