Fixed Laravel passport migrations

This commit is contained in:
Constantin Graf
2025-07-16 16:18:50 +02:00
parent b647a6af71
commit 42fa680bf6
2 changed files with 29 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void
{
// This could be optimized to run all the updates in the eachById
DB::table('oauth_clients')->eachById(function ($client): void {
DB::table('oauth_clients')->whereNotNull('secret')->eachById(function ($client): void {
$secret = $client->secret;
if (Hash::isHashed($secret) && ! Hash::needsRehash($secret)) {
return; // Already hashed and not needing rehash