Fix #2868 on 2.5: support PostgreSQL 10 when looking up sequence metadata #3587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This change fixes #2868 specifically for the legacy 2.5 branch.
An extra path is added for sequence metada access changes introduced in PostgreSQL 10. Previous logic is retained for PostgreSQL <= 9. Non-default ("public") schema names are supported.
Modern versions of doctrine/dbal already work fine with PSQL 10 (see #2893) but require PHP >=7.1. Having this support also on the 2.5 line would allow deploying doctrine/dbal alongside PostgreSQL 10 and PHP5.x.
The change has been field-verified against a Symfony project on a PSQL 10 database, albeit on PHP 7.2. The typical errors in doctrine:schema:update (
SQLSTATE[42703]: Undefined column: 7 ERROR: column "min_value" does not exist
) have gone away with this change.PostgreSQL 9 has not been re-verified. No unit test has been bundled.