-
Notifications
You must be signed in to change notification settings - Fork 116
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
Replace save() with update() #735
Conversation
or is there a specific reason why you think this is better? |
For deleting columns the |
What does "was not working for me" mean? Did you get an error? Did it just apply the migration but nothing happened? I just tested it with latest CakePHP 5 and it works fine with |
When i tried it in a cakephp 4.5.6 project it did not remove the field. My code;
|
I have an example app with exactly that version and your code works fine for me. Are you certain you have the correct datasource set and looking at the correct database? |
Yes, I am. In the same migration I could update fieldnames. But the removal didn't work. Maybe there was an other error. If you are sure the code from the book is correct, you can ignore this commit. |
can you post your whole example? maybe there is a problem if multiple operations are queued up. |
I will remove my code later. I think my code was like this (altered it until it worked for me).
|
i am pretty sure you can't mix either do only |
Thanks for the reply. Maybe we can add it to the docs not to do that 😄 |
Update() should be used instead of save().