-
Sub-task
-
Resolution: Won't Do
-
Minor
-
None
-
1.9
-
None
-
Any
-
MOODLE_19_STABLE
These features should be added to the XMLDB editor/XMLDB stuff.
1) For new tables, allow one new attribute (disable_char_notnull_default_clause = true) to decide if CHAR NOT NULL fields must have de horrible DEFAULT '' clause added or not. All new tables should have it enabled IMO!
2) Allow some sort of CFG->variable to have precedence over
var $unique_keys = false; // Does the generator build unique keys
var $foreign_keys = false; // Does the generator build foreign keys
in generators. This will allow the creation of new site (dev sites) with both UKs and FKs enabled and will allow developers to check code in order to fulfil consttraints.
3) MDL-16976: Make some FK pre-checker. It would iterate over ALL the UK/FK in XMLDB definition, checking existing data fulfils the constraints. Could be used, in the future, to create all those relational stuff in existing sites.