Attempts to create Postgres migrations table after updating to Laravel 9 but it already exists (Postgres+PGBouncer) #43536
-
After upgrading from Laravel 8 to Laravel 9 (including changing
In Laravel 8, we get the expected result:
But in Laravel 9, we get the unexpected result:
Laravel 9 is able to access everything in the tables though. Here's Laravel 9 listing a row from the
Thoughts? Here is the query executed in Laravel 8:
Here is the query executed in Laravel 9:
The specified
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I encountered the same issue where database migrations stopped working after switching to DigitalOcean's connection pooling for PostgreSQL. After some research, I discovered that Laravel 10 actually provides a solution for this, though it’s not mentioned in their official documentation. The fix is located in the PostgresConnector.php file under the following path: To resolve this issue, all I had to do was add the following configuration to my database.php file under the relevant database connection settings:
|
Beta Was this translation helpful? Give feedback.
This is a hack, but I can force. Alternatively, migrations can be performed directly without a connection pool.parseSearchPath
to return the values I want in this scenario by changingconfig('database.migrations')
to the fully qualified{database}.{schema}.{table}
format likehomestead.public.migrations