In MySQL 5.x versions output format of "DESCRIBE" sql statement has changed. In particular it returns "NULL" instead of default column value even for "NOT NULL" fields, that were added to table without specifying actual default value.
That have raised a problem in 3 system places:
1. unit config "Fields" array validator (enable "DBG_VALIDATE_CONFIGS" in "debug.php" and press "Reset Configs Cache" in "System Tools" section.
2. unit config "Fields" array builder (enter table name into "Table Structure" input in "System Tools" section and press "Run" near it)
3. "Re-build Multilanguage Fields" functionality (button in "System Tools" section).
In all mentioned above places NOT NULL fields can have NULL as default value and this can lead to SQL fatal error.
For items "1." and "2." I propose to guess default value using following rule:
- NULL for fields, that can be NULL
- empty string for textual fields
- 0 for numeric fields
For "3." item I propose to omit "DEFAULT ..." statement from "ALTER TABLE ..." database query when we have retrieved "NULL" as default value for "NOT NULL" field.