1. Home
  2. Knowledge Base
  3. Problems (EN)
  4. Error while executing the migration script from version 3.2 to 4.0

Error while executing the migration script from version 3.2 to 4.0

It could occur that we encounter the following error while executing the migration script on the open source version:

Error 1089 at line 184: incorrect sub part key; the used key part isn't a string, the used length is longer then the ky part, or the storage engine doesn't support unique subkeys

This line matches inside the script with:

ALTER TABLE 'tagente_modulo' ADD INDEX nombre ('nombre' (255));

It could happen that while migrating a database which has been migrated more times from older versions, some columns aren’t the expected type for the current migration process, resulting in an error.

In this case, we can check for this with:

describe tagente_modulo;

If the column we’re trying to change has the right type, the response should be:


Otherwise, if the column has a varchar(100)¬†type and the varchar‘ limit is lower than the index limit (255), it generates a MySQL error.

The solution for this event is to insert the following line into the database:

ALTER TABLE 'tagente_modulo' MODIFY 'nombre' text NOT NULL DEFAULT ;

Once done, keep executing the script from the line you had the error in.

If the following line (185) drops a SQL syntax error:

CREATE INDEX `module_group` on tagente_modulo (`id_module_group`) using btree;

This could happen due to your MySQL version, since in other machines with newer versions, this syntax is accepted.

However, the solution is as simple as changing the line to:

CREATE INDEX `module_group` using btree on tagente_modulo (`id_module_group`);

And once done, execute the script from this line.

Anyway, this line has already been modified and in future versions or fixes, this syntax will appear corrected already.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support