summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-07 17:02:42 -0700
committerBrion Vibber <brion@pobox.com>2010-10-07 17:02:42 -0700
commit3c979ec5068ed342fe4fed66c7310923c770793e (patch)
treef99a896c5c7992f265ea67dbdd4a780abf29b88e /scripts
parentcc69ede1eeeb6c122b820367b07a56395a481557 (diff)
Add --all option on dumpschema.php to check all core tables
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dumpschema.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/dumpschema.php b/scripts/dumpschema.php
index 20812fe5b..fd44399a9 100644
--- a/scripts/dumpschema.php
+++ b/scripts/dumpschema.php
@@ -25,7 +25,7 @@ Attempt to pull a schema definition for a given table.
END_OF_CHECKSCHEMA_HELP;
-$longoptions = array('diff');
+$longoptions = array('diff', 'all');
require_once INSTALLDIR.'/scripts/commandline.inc';
function indentOptions($indent)
@@ -87,6 +87,13 @@ function getCoreSchema($tableName)
return $schema[$tableName];
}
+function getCoreTables()
+{
+ $schema = array();
+ include INSTALLDIR . '/db/core.php';
+ return array_keys($schema);
+}
+
function dumpTable($tableName, $live)
{
if ($live) {
@@ -117,6 +124,10 @@ function showDiff($a, $b)
unlink($fnameB);
}
+if (have_option('all')) {
+ $args = getCoreTables();
+}
+
if (count($args)) {
foreach ($args as $tableName) {
if (have_option('diff')) {