diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php index 46233e8dd..23038e5fc 100644 --- a/includes/sql-schema/update.php +++ b/includes/sql-schema/update.php @@ -32,7 +32,7 @@ if (!isset($debug)) { } if (!dbGetLock('schema_update')) { - echo "Schema update already in progress. Exiting"; + echo "Schema update already in progress. Exiting\n"; exit(1); } //end if @@ -93,6 +93,13 @@ if ($handle = opendir($config['install_dir'].'/sql-schema')) { asort($filelist); +if (explode('.', max($filelist), 2) <= $db_rev) { + if ($debug) { + echo "DB Schema already up to date.\n"; + } + exit(0); +} + foreach ($filelist as $file) { list($filename,$extension) = explode('.', $file, 2); if ($filename > $db_rev) {