AnsweredAssumed Answered

[CE 6.5.17] MySQL Update Error when accounts_contacts relationship changes after adding columns to database table

Question asked by aqua.alex aqua.alex on Jul 3, 2014
Hello, I have a small problem and I can't find the cause for it. So maybe someone else has an idea..

I extended the table accounts_contacts with some additional columns to store additional information as tinyint and dates (like active_from to describe the relation more specific).

Now everytime a change happens to the contact (e.g. correcting of a spelling error in name) Sugar tries to do an update to the table accounts_contacts, which ends in a mysql error because it tries to store an empty string in a int or date field (MySQL error 1366: Incorrect integer value: '' for column...). The same thing also happens when I select an Account for the contact. The accounts gets added just fine, but this update / error message is generated for no apparent reason.

Strangely enough: The other way around (Changing Account / Adding a contact to the Account) produces no such error.

Does anyone have a suggestion on how to fix this?

Outcomes