mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Handle empty dbSchema table (#15198)
For example during install. Seeder is run after migrations.
This commit is contained in:
@@ -14,8 +14,8 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (Schema::hasTable('dbSchema')) {
|
||||
if (DB::table('dbSchema')->first()->version != 1000) {
|
||||
if (Schema::hasTable('dbSchema') && DB::table('dbSchema')->exists()) {
|
||||
if (DB::table('dbSchema')->value('version') != 1000) {
|
||||
$error = 'Unsupported upgrade path! You need to update to version 23.7.0 first!';
|
||||
Log::error($error);
|
||||
exit($error);
|
||||
|
||||
Reference in New Issue
Block a user