Upgrade from 7.12.10 to 8.2.2 doctrine:migrations:migrate error

I have a suitecrm7.12.10 installed on docker, and I try to upgrade it to version 8.2.2.
I flolow this tutorial : SuiteCRM 7.12.x+ migration to SuiteCRM 8.x :: SuiteCRM Documentation
And at the finalize step I have this error:

root@d2c1db4faf1d:/var/www/html/suitecrm8# ./bin/console suitecrm:app:upgrade-finalize
Please enter the version to move to: 8.2.2

SuiteCRM Finalize Upgrade
============

Running: legacy-post-upgrade
step: legacy-post-upgrade | status: done
Post Upgrade process complete
Running: add-new-config-entries
step: add-new-config-entries | status: done
Added new config entries to config file
Running: metadata-merge
step: metadata-merge | status: done
Metadata successfully merged
Running: run-migrations
step: run-migrations | status: failed
Error running migrations

Ok so I watch the migration log:

root@d2c1db4faf1d:/var/www/html/suitecrm8# tail logs/upgrade.log
[2023-04-05 15:14:27] upgrade.INFO: step: metadata-merge | status: done [] []
[2023-04-05 15:14:27] upgrade.INFO: step: metadata-merge | messages: [] []
[2023-04-05 15:14:27] upgrade.INFO: Metadata successfully merged [] []
[2023-04-05 15:14:27] upgrade.INFO: step: metadata-merge | debug: no debug info [] []
[2023-04-05 15:14:27] upgrade.INFO: Running step: run-migrations [] []
[2023-04-05 15:14:27] upgrade.INFO: step: run-migrations | status: failed [] []
[2023-04-05 15:14:27] upgrade.INFO: step: run-migrations | messages: [] []
[2023-04-05 15:14:27] upgrade.INFO: Error running migrations [] []
[2023-04-05 15:14:27] upgrade.INFO: step: run-migrations | debug: [] []
[2023-04-05 15:14:27] upgrade.INFO: 15:14:27 CRITICAL  [console] Error thrown while running command "doctrine:migrations:migrate --no-interaction --allow-no-migration". Message: "An exception occurred while executing 'CREATE TABLE migration_versions (version VARCHAR(1024) NOT NULL, executed_at DATETIME DEFAULT NULL, execution_time INT DEFAULT NULL, PRIMARY KEY(version)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB':\n\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes" ["exception" => Doctrine\DBAL\Exception\DriverException { ā€¦},"command" => "doctrine:migrations:migrate --no-interaction --allow-no-migration","message" => """  An exception occurred while executing 'CREATE TABLE migration_versions (version VARCHAR(1024) NOT NULL, executed_at DATETIME DEFAULT NULL, execution_time INT DEFAULT NULL, PRIMARY KEY(version)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB':\n  \n  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes  """]  In AbstractMySQLDriver.php line 128:                                                                                                                                                                                                                                                An exception occurred while executing 'CREATE TABLE migration_versions (version VARCHAR(1024) NOT NULL, executed_at DATETIME DEFAULT NULL, execution_time INT DEFAULT NULL, PRIMARY KEY(version)) DEFAULT CHARACTER SET utf8 COLLATE `ut     f8_unicode_ci` ENGINE = InnoDB':                                                                                                                                                                                                                                                                                                                                                                                                                                                          SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes                                                                                                                                                                                                                                                                                                                                                                          In Exception.php line 18:                                                                                                                       SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes                                                                                                                        In PDOConnection.php line 55:                                                                                                                       SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes                                                                                                                        doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--] [<version>]   [] []
1 Like

Same error, please help

Is it possible to jump from 7.12 to 8.2/8.4 without upgrading to 7.14.x?

@mdauphin @binarycat @rsp
When you upgrade from 7.12.x, to 7.13.x, to 7.14.x, to 8.x.xā€¦ does it work?

Just figured this out. Iā€™m running MySQL 5.5, which is too old for SuiteCRM 8. Would have been nice if the installation process had flagged this instead of stupidly charging forward.

Good point. Would you raise an issue here about how the installer/upgrader should detect outdated versions of MySQL and PHP on the system, flag this, and stop the installation so users can upgrade them.