Closed laacz closed 3 years ago
You're better off submitting the PR if you want this feature. It really isn't a "fix" since support for many schemas isn't officially documented:
The config('database.connections.pgsql.schema')
sample shows a single schema configured with a string:
Schema::hasTable()
supporting a string argument.Feature requests are meant to be directed through https://github.com/laravel/framework/discussions.
Thanks, @derekmd. I'll do just that then.
Thanks @derekmd
Description:
When checking for table existence using
Schema::hasTable()
, PostgreSQL grammar does not take into account multiple schemas, althoughIlluminate\Database\Connectors\PostgresConnector::configureSchema()
allows for multiple schemas insearch_path
.I'll be happy to offer a fix via PR later, if this will be considered worth fixing.
Steps To Reproduce:
Configure your postgres database connection with multiple schemas. For example:
Schema::hasTable
generated query is:It should be (with schemas array as a binding):