[9.x] Use write connection on Schema::getColumnListing() and Schema::hasTable() for MySQL and PostgreSQL #44946
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\Builder
would do aselect
on the write connection.The change was made to prevented migrations from getting
PDOException
when 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.