[5.8] Fix ambiguous UPDATED_AT columns - #26031
Merged
Merged
Conversation
mfn
reviewed
Oct 10, 2018
This was referenced Oct 10, 2018
|
Great work! 😁 |
Contributor
|
@driesvints Is there anyway to get this merged into 5.7? I understand that because 5.5 is LTS it gets fixed, but it would be nice to let the current stable version get the fix too? |
Contributor
|
I'm afraid it's not possible, as the change to |
Contributor
@mfn Thanks for the feedback. It is interesting that 5.5 was able to be patched without breaking it, but that the current stable 5.7 cannot be patched. I appreciate you taking the time to answer. |
Contributor
Author
|
@jimmypuckett Are you referring to #26022? We had to revert it in #26024. |
This was referenced Dec 30, 2018
RatkoR
pushed a commit
to RatkoR/laravel-crate.io
that referenced
this pull request
Mar 5, 2019
We remove table prefix that was added in laravel/framework#26031
This was referenced May 19, 2019
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.
#13519 attempted to fix ambiguous
UPDATED_ATcolumns inJOINqueries:If both tables have an
updated_atcolumn, you get an "ambiguous column name" error (on MySQL).To fix this, the previous PR qualified the column with the table name. This didn't work because PostgreSQL and SQLite don't allow qualified columns in
UPDATEqueries (#13707).#22366 updated the
SQLiteGrammarto remove the table name from qualified columns when anUPDATEquery is compiled. This PR applies the same behavior to thePostgresGrammar.We can now safely qualify the column on all platforms. We have to replace
Arr::add()witharray_merge()because the former interprets a qualified column as a nested key.$valuesis the second argument so that the users can override theupdated_atvalue (as they can now).Fixes #13909.