From bc59167eff5bb982915827d5c95a2156b8af600e Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Wed, 9 Oct 2024 15:26:54 +0900 Subject: [PATCH] Fix supabase empty password migrations --- bin/MigrationCLI.php | 2 +- src/Migration/Sources/Supabase.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/MigrationCLI.php b/bin/MigrationCLI.php index 6a62490..04c80a5 100644 --- a/bin/MigrationCLI.php +++ b/bin/MigrationCLI.php @@ -220,7 +220,7 @@ public function getSource(): Source $_ENV['SOURCE_SUPABASE_TEST_ENDPOINT'], $_ENV['SOURCE_SUPABASE_TEST_KEY'], $_ENV['SOURCE_SUPABASE_TEST_HOST'], - $_ENV['SOURCE_SUPABASE_TEST_DATBASE_NAME'], + $_ENV['SOURCE_SUPABASE_TEST_DATABASE_NAME'], $_ENV['SOURCE_SUPABASE_TEST_DATABASE_USER'], $_ENV['SOURCE_SUPABASE_TEST_DATABASE_PASSWORD'] ); diff --git a/src/Migration/Sources/Supabase.php b/src/Migration/Sources/Supabase.php index e06af13..fa57d8a 100644 --- a/src/Migration/Sources/Supabase.php +++ b/src/Migration/Sources/Supabase.php @@ -384,7 +384,7 @@ private function exportUsers(int $batchSize): void foreach ($users as $user) { $hash = null; - if (array_key_exists('encrypted_password', $user)) { + if (array_key_exists('encrypted_password', $user) && ! empty($user['encrypted_password'])) { $hash = new Hash($user['encrypted_password'], '', Hash::ALGORITHM_BCRYPT); }