From 7bc2ad1162953b1f411c3d6d0bd19eb55f9e90a9 Mon Sep 17 00:00:00 2001 From: Aleksey Tupichenkov Date: Mon, 20 Oct 2025 17:54:57 +0300 Subject: [PATCH] fix: fix multiply zero changes --- src/Doctrine/SchemaConnection.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Doctrine/SchemaConnection.php b/src/Doctrine/SchemaConnection.php index b19d14d..5943bf5 100644 --- a/src/Doctrine/SchemaConnection.php +++ b/src/Doctrine/SchemaConnection.php @@ -12,6 +12,7 @@ class SchemaConnection extends DBALConnection { private static ?BaggageSchemaResolver $schemaResolver = null; + private ?string $currentSchema = null; public static function setSchemaResolver(BaggageSchemaResolver $resolver): void { @@ -32,8 +33,13 @@ public function connect(): bool return $connection; } + if ($this->currentSchema === $schema) { + return $connection; + } + $this->ensurePostgreSql(); $this->applySearchPath($schema); + $this->currentSchema = $schema; return $connection; }