Merge pull request #6998 from coollabsio/andrasbacsai/fix-redis-password-column

fix: handle redis_password in API database creation
This commit is contained in:
Andras Bacsai 2025-10-24 18:10:05 +02:00 committed by GitHub
commit 28cab39471
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,13 @@ function create_standalone_redis($environment_id, $destination_uuid, ?array $oth
$database = new StandaloneRedis;
$database->uuid = (new Cuid2);
$database->name = 'redis-database-'.$database->uuid;
$redis_password = \Illuminate\Support\Str::password(length: 64, symbols: false);
if ($otherData && isset($otherData['redis_password'])) {
$redis_password = $otherData['redis_password'];
unset($otherData['redis_password']);
}
$database->environment_id = $environment_id;
$database->destination_id = $destination->id;
$database->destination_type = $destination->getMorphClass();