[9.x] Use write connection on Schema::getColumnListing() and Schema::hasTable() for MySQL and PostgreSQL#44946
Merged
taylorotwell merged 4 commits intolaravel:9.xfrom Nov 15, 2022
taka-oyama:9.x
Merged
[9.x] Use write connection on Schema::getColumnListing() and Schema::hasTable() for MySQL and PostgreSQL#44946taylorotwell merged 4 commits intolaravel:9.xfrom taka-oyama:9.x
taylorotwell merged 4 commits intolaravel:9.xfrom
taka-oyama:9.x
Conversation
Contributor
Author
|
I just realized there were no tests for this case. I will add some. -> done. |
Contributor
Author
|
AWS's S3 library seems to be failing but that is unrelated to this fix. I submitted a |
driesvints
approved these changes
Nov 15, 2022
Member
|
@taka-oyama I didn't see a PR from you, only an issue? Anyway I sent one on here: aws/aws-sdk-php#2560 |
Contributor
Author
|
Sorry, you're right, I meant I sent an issue. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a follow up PR to #25203.
That PR made it so that the
Illuminate\Database\Schema\Builderwould do aselecton the write connection.The change was made to prevented migrations from getting
PDOExceptionwhen the read connection had not received the preceding migration changes due to replication lag.The problem with that PR was that it applied the fix towards the generic schema builder which is overridden for MySQL and PostgreSQL specific builders.
So the fix was not applied for MySQL and PostgreSQL. This PR is an attempt to fix that.
This change will not break any existing features.