bail if schema is already up to date

This commit is contained in:
Clint Armstrong
2015-07-22 08:31:51 -04:00
parent 1379a13c76
commit c5fcb87b51

View File

@@ -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) {