diff options
Diffstat (limited to 'scripts/checkschema.php')
-rwxr-xr-x | scripts/checkschema.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/checkschema.php b/scripts/checkschema.php index bf52abe15..73fd74302 100755 --- a/scripts/checkschema.php +++ b/scripts/checkschema.php @@ -27,4 +27,18 @@ END_OF_CHECKSCHEMA_HELP; require_once INSTALLDIR.'/scripts/commandline.inc'; +function tableDefs() +{ + $schema = array(); + require INSTALLDIR.'/db/core.php'; + return $schema; +} + +$schema = Schema::get(); +$schemaUpdater = new SchemaUpdater($schema); +foreach (tableDefs() as $table => $def) { + $schemaUpdater->register($table, $def); +} +$schemaUpdater->checkSchema(); + Event::handle('CheckSchema'); |