Project

General

Profile

Actions

Error #58

closed

Upgrade failes whem template directory is same as module or language directory

Added by Ruud over 7 years ago. Updated almost 7 years ago.

Status:
Done
Priority:
Dringend
Assignee:
Target version:
-
Start date:
2017-09-20
Due date:
2017-10-31
% Done:

100%

Estimated time:

Description

When doing upgrades...

The install_struct.sql will rebuild the addons table, but it uses a unique constraint on the 'directory' column.
It is perfectly fine to have a module in a directory 'abc' and a template in a directory 'abc'.

The line:

ALTER TABLE `{TABLE_PREFIX}addons` ADD UNIQUE `ident` ( `directory` );

will fail in this case, breaking the import of install_struct.sql.
Because of this other tables are not upgraded with this issue as result (failed upgrade): https://forum.websitebaker.org/index.php/topic,30477.msg212348.html#msg212348

A unique index should be done on both fields `type` and `directory` to make it really unique.
Unfortunatly trying this solution generates the error:

ALTER TABLE `addons` ADD UNIQUE INDEX `ident` (`type`, `directory`);
/* SQL error (1071): Specified key was too long; max key length is 1000 bytes */

Both fields are set to VARCHAR (255). Using utf8 these fields can have 765 bytes per field (using utf8mb4 > 1020 bytes)

The fix would be make the fields shorter ( VARCHAR (125) to enable future utfmb4 ) or not to create a unique index on this table.

Actions #1

Updated by Dietmar about 7 years ago

  • Due date set to 2017-10-31
  • Status changed from New to In Progress
  • Assignee changed from Anonymous to Dietmar
  • % Done changed from 0 to 100
Actions #2

Updated by Manuela about 7 years ago

  • Status changed from In Progress to Feedback
Actions #3

Updated by Dietmar almost 7 years ago

  • Status changed from Feedback to Done
Actions

Also available in: Atom PDF