From 3c979ec5068ed342fe4fed66c7310923c770793e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 7 Oct 2010 17:02:42 -0700 Subject: [PATCH] Add --all option on dumpschema.php to check all core tables --- scripts/dumpschema.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/dumpschema.php b/scripts/dumpschema.php index 20812fe5b8..fd44399a9c 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')) { -- 2.39.2