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

[5.8] Fix qualified UPDATED_AT timestamps #27025

Merged
merged 2 commits into from
Jan 1, 2019
Merged

[5.8] Fix qualified UPDATED_AT timestamps #27025

merged 2 commits into from
Jan 1, 2019

Conversation

staudenmeir
Copy link
Contributor

#26031 qualified UPDATED_AT timestamps to fix ambiguity issues.

This broke queries on models without an UPDATED_AT timestamp:

class User extends Model {
    public $timestamps = true;

    const UPDATED_AT = null;
}

User::query()->update(['name' => 'foo']);
update `users` set `name` = ?, `users`.`` = ?
                                       ^

Before, this case has been handled by Arr::add() . Now, we have to take care of it ourselves.

@taylorotwell taylorotwell merged commit 7755fa2 into laravel:master Jan 1, 2019
@staudenmeir staudenmeir deleted the update-timestamp branch January 1, 2019 19:59
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.

2 participants