From f0ea5f318b187dcf81d419acf7e8fd25e2051541 Mon Sep 17 00:00:00 2001 From: Pablo Sanchez Date: Tue, 21 Feb 2017 14:40:21 +0000 Subject: [PATCH] [FIX] #18026 - PostgreSQL: improve table existence check (or assume default schema as "public") --- 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(