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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.2.2
    • None
    • Database SQL/XMLDB
    • MOODLE_22_STABLE
    • 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.

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gb2048 Gareth J Barnard
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: