Details

    • Type: Sub-task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: