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

Allow overriding the db server version #11900

Merged

Conversation

brandonkelly
Copy link
Member

Description

Azure has you connect to a DB server that is actually just a proxy for the real database, and has a bug where PDO::ATTR_SERVER_VERSION doesn’t accurately report the real DB server version.

This works around the bug by adding a new version database connection setting, which can be used to override whatever PDO::ATTR_SERVER_VERSION says when calling Craft::$app->db->schema->serverVersion. (Similar to what Laravel does: laravel/framework#32708)

Related issues

@brandonkelly brandonkelly requested a review from a team as a code owner September 7, 2022 23:52
@linear
Copy link

linear bot commented Sep 7, 2022

DEV-993 Allow overriding the DB server version

Would provide a way to workaround an issue where PDO::ATTR_SERVER_VERSION can’t be trusted in Azure, since the server you connect to is a proxy server for the actual database.

@brandonkelly brandonkelly merged commit 8d21429 into 4.3 Sep 8, 2022
@brandonkelly brandonkelly deleted the feature/dev-993-allow-overriding-the-db-server-version branch September 8, 2022 00:40
brandonkelly added a commit that referenced this pull request Sep 9, 2022
…-overriding-the-db-server-version"

This reverts commit 8d21429, reversing
changes made to 851bb0f.

# Conflicts:
#	CHANGELOG-WIP.md
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.

1 participant