mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
bail if schema is already up to date
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user