From 3eacaa325bfcda7e5167ab7c9786dece770fa3b7 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 5 Jan 2026 13:16:28 +0100 Subject: [PATCH] fix: make PgBouncer prepared statement disabling configurable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use PDO::PGSQL_ATTR_DISABLE_PREPARES with DB_DISABLE_PREPARES env variable to prevent "cached plan must not change result type" errors during rolling deployments with PgBouncer. Defaults to false for normal operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index cd27454ab..366ff90b5 100644 --- a/config/database.php +++ b/config/database.php @@ -49,7 +49,7 @@ 'search_path' => 'public', 'sslmode' => 'prefer', 'options' => [ - PDO::ATTR_EMULATE_PREPARES => true, + PDO::PGSQL_ATTR_DISABLE_PREPARES => env('DB_DISABLE_PREPARES', false), ], ],