Skip to content

Commit 1ab86aa

Browse files
Merge pull request #14 from MacPaw/fix/fix-multiply-zero-changes
fix: fix multiply zero changes
2 parents 8c234b0 + 409dabb commit 1ab86aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Doctrine/SchemaConnection.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
class SchemaConnection extends DBALConnection
1313
{
1414
private static ?BaggageSchemaResolver $schemaResolver = null;
15+
private ?string $currentSchema = null;
1516

1617
public static function setSchemaResolver(BaggageSchemaResolver $resolver): void
1718
{
@@ -32,8 +33,13 @@ public function connect(): bool
3233
return $connection;
3334
}
3435

36+
if ($this->currentSchema === $schema) {
37+
return $connection;
38+
}
39+
3540
$this->ensurePostgreSql();
3641
$this->applySearchPath($schema);
42+
$this->currentSchema = $schema;
3743

3844
return $connection;
3945
}

0 commit comments

Comments
 (0)