-
Bug
-
Resolution: Fixed
-
Minor
-
3.2.2
-
PostgreSQL
-
MOODLE_32_STABLE
-
MOODLE_34_STABLE
-
MDL-59323-master -
When a NOT NULL char field is specified in XMLDB as not having a default (there is no DEFAULT in the xml), it actually is set to have default empty string, at least in Postgres. See MDL-6218.
The 'Check defaults' button in xmldb does not detect inconsistencies that arise as a result. For example, it is possible that a new installation would create the field (with default '') but an upgrade would create it with no default. Because check defaults treats 'no default' an 'empty default' interchangeably, it does not spot these differences.
I propose enhancing the check defaults feature so that it includes this detail in the check. This would help developers like me spot these problems, as we do use 'check defaults' as a step in our development checklist.
(I don't have a lot of time to work on this but hopefully it might be good enough... )
Edited to add : When a NOT NULL char ...
- caused a regression
-
MDL-63252 XMLDB check defaults returns false warnings
- Closed