Fix install failing this migration (#15262)

Unsure if this the correct fix or if it even fixes the issue :D
https://community.librenms.org/t/install-fails/22181
This commit is contained in:
Tony Murray
2023-08-29 08:00:17 -05:00
committed by GitHub
parent bbe835b5f9
commit 976cb53ead

View File

@@ -29,7 +29,11 @@ return new class extends Migration
}
});
Bouncer::refresh(); // clear cache
try {
Bouncer::refresh(); // clear cache
} catch (Exception $e) {
// if this fails, there was no cache anyway
}
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('level');
@@ -52,7 +56,11 @@ return new class extends Migration
$user->save();
});
Bouncer::refresh();
try {
Bouncer::refresh(); // clear cache
} catch (Exception $e) {
// if this fails, there was no cache anyway
}
}
private function getLevel(User $user): int