summaryrefslogtreecommitdiff
path: root/scripts/checkschema.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkschema.php')
-rwxr-xr-xscripts/checkschema.php14
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');