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

Renaming a table does not facilitate the renaming of the associated comment.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Testing Instructions:
      Hide

      Pick any block / module / course format with a 'db' folder, change the table name and comment in the 'install.xml' file and attempt to do the same action in the 'upgrade.php' file.

      Observe the table description in your chosen database viewer.

      Show
      Pick any block / module / course format with a 'db' folder, change the table name and comment in the 'install.xml' file and attempt to do the same action in the 'upgrade.php' file. Observe the table description in your chosen database viewer.
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      When you are writing update code in a module/block/course format's 'upgrade.php' and wish to rename a table you can call the function 'rename_table' in '/lib/ddl/database_manager.php', however you cannot rename the associated comment on the table that was defined in the 'install.xml' file. So although you can alter the comment in 'install.xml' for new installations, upgrading installations have the wrong comment in their database to explain what the table is for.

      I have stated that this is for 2.2.2 but could be elsewhere too.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: