Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10774

db_tools::create_unique_index does not use specified index names on MySQL

    Details

      Description

      The generated code should be ALTER TABLE tablename ADD UNIQUE INDEX indexname (columns);

      Currently the indexname is not used, leading to the first column name being used as default which can cause problems if you later want to drop an INDEX by name in the updater.

      We will have to do some analysis to see if we have added unique indexes in updates before and whether we can identify and rename them safely.

        Issue Links

          Activity

          Hide
          bantu Andreas Fischer added a comment -

          I've analysed database_update.php of develop-olympus and there is only one unique key added:

          phpBB 3.0.5 added a unique key on column auth_option of table ACL_OPTIONS_TABLE. The name is specified as "auth_option" and it is also called like that (since the column name is used as you pointed out) on my local dev board. So this should be not an issue.

          Show
          bantu Andreas Fischer added a comment - I've analysed database_update.php of develop-olympus and there is only one unique key added: phpBB 3.0.5 added a unique key on column auth_option of table ACL_OPTIONS_TABLE. The name is specified as "auth_option" and it is also called like that (since the column name is used as you pointed out) on my local dev board. So this should be not an issue.
          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          If you are going to specify index name manually the patch should be tested on postgres.

          Show
          Oleg Oleg [X] (Inactive) added a comment - If you are going to specify index name manually the patch should be tested on postgres.
          Hide
          bantu Andreas Fischer added a comment -

          This is a MySQL only section.

          Show
          bantu Andreas Fischer added a comment - This is a MySQL only section.

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              naderman Nils Adermann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development