Skip to content

Commit

Permalink
[FIX] #18026 - PostgreSQL: improve table existence check (or assume d…
Browse files Browse the repository at this point in the history
…efault schema as "public") (#18042)
  • Loading branch information
phackwer authored and taylorotwell committed Feb 21, 2017
1 parent 636020a commit 088f9a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Schema/PostgresBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public function hasTable($table)

$schema = $this->connection->getConfig('schema');

$schema = $schema ? $schema : 'public';

$table = $this->connection->getTablePrefix().$table;

return count($this->connection->select($sql, [$schema, $table])) > 0;
Expand Down

0 comments on commit 088f9a4

Please sign in to comment.