Install: Validate database before migrating (#12867)

* Validate database during install
Needed to remove usages of legacy functions in the validation

* Fix output, restore real versions
This commit is contained in:
Tony Murray
2021-05-13 07:18:54 -05:00
committed by GitHub
parent 500b0ac6fa
commit df5096e449
15 changed files with 77 additions and 69 deletions

View File

@@ -41,7 +41,7 @@ if (config('cache.default') == 'database' && ! \Schema::hasTable('cache_locks'))
$schemaLock = Cache::lock('schema', 86000);
if (! empty($skip_schema_lock) || $schemaLock->get()) {
$db_rev = get_db_schema();
$db_rev = \LibreNMS\DB\Schema::getLegacySchema();
$migrate_opts = ['--force' => true, '--ansi' => true];
@@ -93,7 +93,7 @@ if (! empty($skip_schema_lock) || $schemaLock->get()) {
echo "-- Done\n";
// end legacy update
$db_rev = get_db_schema();
$db_rev = \LibreNMS\DB\Schema::getLegacySchema();
}
if ($db_rev == 1000) {