-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Query builder keeps on using dropped column #45335
Comments
renaming but I'd like to keep the original name.. |
Are you sure "paid" columns no longer exists in the payouts table? FYI: Laravel pulls the table columns before firing the update query
|
Thanks for helping @ankurk91. I also often recommend to put any column renames or drops in a separate |
Of course I'm sure. Why would you think I opened an issue here? No, I'm not using OP-cache |
Do you mean a separate Schema::table() call when you use the dropColumn() method? Maybe that should be documented |
I see the issue is closed, congratulations on fixing the bug so quickly |
This feature was introduced a long time ago No one has reported such issue so far. |
that's not the issue |
Description:
I dropped a column from one of my tables using the following migration script:
Since then, I cannot reliably to update() or save() on the model.
I get the following error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'paid' in 'field list' in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:566
The update() method never seem to work. The save() method sometimes works. But then it doesn't.
But of course the column "paid" appears NOWHERE in my model or my scripts. I also tried a full search in every folder, but nothing turned up. Example of a script that fails with the error above:
Clearing the cache has no effect.
Why does the query builder still use that column?
Steps To Reproduce:
I couldn't reproduce the problem on a different table, but the behavior is the same in dev and production.
The text was updated successfully, but these errors were encountered: