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
where-vessels: increase window size to make room for more smashing
[ypp-sc-tools.db-live.git]
/
yarrg
/
db-idempotent-populate
diff --git
a/yarrg/db-idempotent-populate
b/yarrg/db-idempotent-populate
index 691f77ba8af294d0f8e47e3463137df30d2205f5..eb1a30b43a581047e330b4f226670083366e3fb0 100755
(executable)
--- a/
yarrg/db-idempotent-populate
+++ b/
yarrg/db-idempotent-populate
@@
-229,6
+229,7
@@
table_maycompact('commods', 'commodid',
commodclassid INTEGER NOT NULL
ordval INTEGER NOT NULL
posinclass INTEGER NOT NULL
commodclassid INTEGER NOT NULL
ordval INTEGER NOT NULL
posinclass INTEGER NOT NULL
+ flags TEXT NOT NULL
END
table_maycompact('islands', 'islandid',
END
table_maycompact('islands', 'islandid',
@@
-343,6
+344,7
@@
END
commodclassid
ordval
posinclass
commodclassid
ordval
posinclass
+ flags
);
my $insert= $dbh->prepare("
INSERT OR IGNORE INTO $table{commods}
);
my $insert= $dbh->prepare("
INSERT OR IGNORE INTO $table{commods}
@@
-370,7
+372,8
@@
END
$c->{Volume},
$clid,
commodsortkey($commod),
$c->{Volume},
$clid,
commodsortkey($commod),
- $posincl{$commod}
+ $posincl{$commod},
+ $c->{Flags}
);
$insert->execute($commod, @valuevalues);
$update->execute(@valuevalues, $commod);
);
$insert->execute($commod, @valuevalues);
$update->execute(@valuevalues, $commod);
@@
-477,7
+480,7
@@
END
;
}
;
}
-db_check_referential_integrity();
+db_check_referential_integrity(
1
);
#---------- compact IDs ----------
#---------- compact IDs ----------
@@
-539,7
+542,7
@@
END
#---------- put it all into effect ----------
#---------- put it all into effect ----------
-db_chkcommit();
+db_chkcommit(
1
);
{
local $dbh->{AutoCommit} = 1;
{
local $dbh->{AutoCommit} = 1;