Skip to content

Commit

Permalink
Merge pull request #51 from utopia-php/fix-supabase-user-migrations-0…
Browse files Browse the repository at this point in the history
….6.x

Fix supabase empty password migrations
  • Loading branch information
abnegate authored Oct 9, 2024
2 parents 7b2d40d + bc59167 commit 1f67226
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/MigrationCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']
);
Expand Down
2 changes: 1 addition & 1 deletion src/Migration/Sources/Supabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 1f67226

Please sign in to comment.