You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose that this one line should be like in other places of the same file: $this->connection->getConfig('search_path') ?: $this->connection->getConfig('schema')
Otherwise, if you check table exists at postgres schema from env variable DB_SCHEMA referenced in the config, but it checks default postgres schema "public", ignoring the configuration.
Steps To Reproduce:
Create table "migrations" at default postgres schema public
Set env variable DB_SCHEMA with value different from "public" that do not contain any tables (the schema should exist at the DB, of course)
Run command php artisan migrate.
You'll see that it will fail with error that it can't reference "migrations" table that not exist.
If you turn on SQL queries log, you'll see that it have checked table "migrations" in schema "public", found it exists and try to make a query to that table in schema you referenced at the env variable DB_SCHEMA that still does not exist.
The text was updated successfully, but these errors were encountered:
You'll want to fill out the issue template or this will be closed. When fixing #41088 I didn't even see parseSearchPath() is (mostly) copypasta'd into a second class so that must be fixed too.
Description:
framework/src/Illuminate/Database/Schema/PostgresBuilder.php
Line 200 in 6c0d272
I suppose that this one line should be like in other places of the same file:
$this->connection->getConfig('search_path') ?: $this->connection->getConfig('schema')
Otherwise, if you check table exists at postgres schema from env variable DB_SCHEMA referenced in the config, but it checks default postgres schema "public", ignoring the configuration.
Steps To Reproduce:
php artisan migrate
.You'll see that it will fail with error that it can't reference "migrations" table that not exist.
If you turn on SQL queries log, you'll see that it have checked table "migrations" in schema "public", found it exists and try to make a query to that table in schema you referenced at the env variable DB_SCHEMA that still does not exist.
The text was updated successfully, but these errors were encountered: