X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fdumpschema.php;h=05638cda4cb22aed28c57fe79916a8c1b1814a49;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=2b238f0066ce3af99494c9303c3655109e3a3ada;hpb=e7c7fd39fc948f1169512916077185dd29973b60;p=quix0rs-gnu-social.git diff --git a/scripts/dumpschema.php b/scripts/dumpschema.php old mode 100644 new mode 100755 index 2b238f0066..05638cda4c --- a/scripts/dumpschema.php +++ b/scripts/dumpschema.php @@ -34,7 +34,7 @@ Attempt to pull a schema definition for a given table. END_OF_CHECKSCHEMA_HELP; $longoptions = array('diff', 'all', 'create', 'update', 'raw', 'checksum'); -require_once INSTALLDIR.'/scripts/commandline.inc'; +require_once INSTALLDIR.'/scripts/commandline.inc.php'; function indentOptions($indent) { @@ -177,7 +177,7 @@ function dumpDiff($tableName, $filter) if ($section == 'fields') { // this shouldn't be needed maybe... wait what? } - $diff = $schema->diffArrays($old, $def, $section, $compare); + $diff = $schema->diffArrays($old, $def, $section); $chunks = array('del', 'mod', 'add'); foreach ($chunks as $chunk) { if ($diff[$chunk]) { @@ -205,6 +205,10 @@ function tweakPrimaryKey($def) $def['primary keys'] = array('primary key' => $def['primary key']); unset($def['primary key']); } + if (isset($def['description'])) { + $def['descriptions'] = array('description' => $def['description']); + unset($def['description']); + } return $def; } @@ -246,4 +250,4 @@ if (count($args)) { } } else { show_help($helptext); -} \ No newline at end of file +}