From 7de829c280bfd74103be73c1794dbc695a679b63 Mon Sep 17 00:00:00 2001 From: tpetry Date: Mon, 26 Feb 2024 10:32:54 +0100 Subject: [PATCH] change to be the same as core Laravel code --- src/PostgresEnhancedConnection.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PostgresEnhancedConnection.php b/src/PostgresEnhancedConnection.php index c643c04..1879141 100644 --- a/src/PostgresEnhancedConnection.php +++ b/src/PostgresEnhancedConnection.php @@ -117,12 +117,11 @@ public function serverVersion(): string protected function getDefaultQueryGrammar(): QueryGrammar { $grammar = new QueryGrammar(); - $grammar->setTablePrefix($this->tablePrefix); if (method_exists($grammar, 'setConnection')) { $grammar->setConnection($this); } - return $grammar; + return $this->withTablePrefix($grammar); } /** @@ -131,12 +130,11 @@ protected function getDefaultQueryGrammar(): QueryGrammar protected function getDefaultSchemaGrammar(): SchemaGrammar { $grammar = new SchemaGrammar(); - $grammar->setTablePrefix($this->tablePrefix); if (method_exists($grammar, 'setConnection')) { $grammar->setConnection($this); } - return $grammar; + return $this->withTablePrefix($grammar); } /**