From 53d0cc6839b142b736146e42b767beea264a040c Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:04:30 +0200 Subject: [PATCH] fix: handle redis_password in API database creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The redis_password column was removed from standalone_redis table in migration 2024_10_16_120026_move_redis_password_to_envs.php, moving passwords to environment_variables table. However, the API endpoint still accepted redis_password parameter and tried to mass-assign it via fill(), causing SQL error: "column redis_password of relation standalone_redis does not exist" Fixed by extracting redis_password from $otherData before fill() and using it when creating the REDIS_PASSWORD environment variable, similar to how the migration handled the transition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- bootstrap/helpers/databases.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.php index aa7be3236..5df36db33 100644 --- a/bootstrap/helpers/databases.php +++ b/bootstrap/helpers/databases.php @@ -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();