Project

General

Profile

Fehler #58

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

Added by ruud over 1 year ago. Updated about 1 year ago.

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

100%

Estimated time:
Operating System:
-any-

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.

History

#1 Updated by Luisehahne over 1 year ago

  • Due date set to 2017-10-31
  • Status changed from Neu to In Bearbeitung
  • Assignee changed from Darkviper to Luisehahne
  • % Done changed from 0 to 100

#2 Updated by admin about 1 year ago

  • Status changed from In Bearbeitung to Feedback

#3 Updated by Luisehahne about 1 year ago

  • Status changed from Feedback to Erledigt

Also available in: Atom PDF