When creating new MySQL fields in Google App Maker, I have attempted to mark them as 'required' and I am receiving the below error:
Data truncation: Invalid use of NULL value
This only occurs for some fields, and not others. I can't seem to figure out why Google App Maker won't allow the change.
Has anybody had a similar issue? How can I troubleshoot the problem?
When you mark a field as Required, App Maker is trying to modify the MySQL table schema by adding a NOT NULL constraint to that column. If there is already data in the table, including some NULL values, then MySQL will throw SQL Error (1138): Invalid use of NULL value
.
You need to replace all NULL values in that column first.