Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Update PostgreSQLSchemaManager to set correct config key value #840

Merged
merged 5 commits into from
Apr 8, 2022

Conversation

nthndnn
Copy link
Contributor

@nthndnn nthndnn commented Apr 7, 2022

In Laravel 9.0, the Postgres schema config key has been replaced by search_path (https://laravel.com/docs/9.x/upgrade#postgres-schema-configuration).

This PR updates the PostgreSQLSchemaManager to check which config value is in use and sets it accordingly. It might be worth setting both no matter whether the key exists or not, but I thought this would be the best solution.

@nthndnn nthndnn changed the title Update PostgreSQLSchemaManager to set correct config key value [3.x] Update PostgreSQLSchemaManager to set correct config key value Apr 7, 2022
@nthndnn
Copy link
Contributor Author

nthndnn commented Apr 7, 2022

I've updated this to use version_compare as this has been done elsewhere and looks like a more readable solution 😄

@stancl
Copy link
Member

stancl commented Apr 7, 2022

The test could probably use version_compare() as well

@nthndnn
Copy link
Contributor Author

nthndnn commented Apr 7, 2022

@stancl cool, wasn't sure whether app()->version() was available in the tests

@stancl
Copy link
Member

stancl commented Apr 8, 2022

Looks great now, thanks a lot for the PR!

@stancl stancl merged commit 40bf576 into archtechx:3.x Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants