After MySQL version upgrade, there is a possibility that application will start getting error/exception for INSERT/UPDATE operation due missing default data/values as follows,
ERROR: Field ‘column_name’ doesn’t have a default value
Also above error will trigger for the wrong data type or out of range value for the column with INSERT/UPDATE sql operation.
Reason for this error is new SQL_MODE default values (MySQL 5.7 ) that included STRICT_TRANS_TABLES value in it and sql_mode value in default my.cnf created after installation[ Under /etc/my.cnf or /usr/my.cnf ]
| sql_mode | MySQL version | Default |
| <=5.6.5 | ” | |
| >= 5.6.6 | … |