Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53495

Report the actual name length restriction for table names

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.2
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Testing Instructions:
      Hide

      Edit:
      lib/xmldb/xmldb_table.php:47 and increase the length.
      lib/xmldb/xmldb_field.php:82 and increase the length.

      1. go to Site Administration > Development > XMLDB Editor
      2. Edit a table name, ensure you can now name it as long as the length you altered before. The field should accept this length.
      3. Edit a table field, ensure you can now name is as long as the length you altered before. The field should accept this length.
      4. Run unit tests against a database that supports the new lengths you entered. MySQL and PostgreSQL will support table: 58 and field: 63 without prefix changes.

      Show
      Edit: lib/xmldb/xmldb_table.php:47 and increase the length. lib/xmldb/xmldb_field.php:82 and increase the length. 1. go to Site Administration > Development > XMLDB Editor 2. Edit a table name, ensure you can now name it as long as the length you altered before. The field should accept this length. 3. Edit a table field, ensure you can now name is as long as the length you altered before. The field should accept this length. 4. Run unit tests against a database that supports the new lengths you entered. MySQL and PostgreSQL will support table: 58 and field: 63 without prefix changes.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:

      Description

      If somebody happens to customize the name length constant for database tables, it should report the value listed, not 28 which is the oracle limit.

      I know for HQ it will stay as 28 due to Oracle, but given it is a variable it should display the correct value.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16