Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Doctrine/SchemaConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class SchemaConnection extends DBALConnection
{
private static ?BaggageSchemaResolver $schemaResolver = null;
private ?string $currentSchema = null;

public static function setSchemaResolver(BaggageSchemaResolver $resolver): void
{
Expand All @@ -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;
}
Expand Down
Loading