From d48e91a9b4d25f3fa45407ab60ee7cc35b66c2b3 Mon Sep 17 00:00:00 2001 From: phackwer Date: Tue, 21 Feb 2017 14:47:50 +0000 Subject: [PATCH] [FIX] #18026 - PostgreSQL: improve table existence check (or assume default schema as "public") (#18041) --- src/Illuminate/Database/Schema/PostgresBuilder.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Database/Schema/PostgresBuilder.php b/src/Illuminate/Database/Schema/PostgresBuilder.php index 42198f89fcc1..fb73deaedf1e 100755 --- a/src/Illuminate/Database/Schema/PostgresBuilder.php +++ b/src/Illuminate/Database/Schema/PostgresBuilder.php @@ -16,6 +16,8 @@ public function hasTable($table) $schema = head($schema); } + $schema = $schema ? $schema : 'public'; + $table = $this->connection->getTablePrefix().$table; return count($this->connection->select(