This topic contains 1 reply, has 2 voices, and was last updated by Andrey Yatsenko 5 years, 7 months ago.
- Topic
Context:
os win10
php7.1
mysql 8.0 <— compatibility issue !!
php builtin server
Check system requirements->all ok!Launching “oro:install” the process abort the migratin process due to Mysql syntax error:
12345678910111213ERROR: An exception occurred while executing'CREATE TABLE oro_workflow_definition (name VARCHAR(255) NOT NULL, start_step_id INT DEFAULT NULL...SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;check the manual that corresponds to your MySQL server version for the rightsyntax to use near 'system TINYINT(1)... //skipping migration stuff hereIn MigrationExecutor.php line 116:Failed migrations: Oro\Bundle\WorkflowBundle\Migrations\Schema\OroWorkflowBundleInstaller.The issue is caused by the use of reserved word for column name not compatible in mysql 8.0.
12345678910111213141516171819202122232425namespace Oro\Bundle\WorkflowBundle\Migrations\Schema;.../*** @SuppressWarnings(PHPMD.TooManyMethods)*/class OroWorkflowBundleInstaller implements Installation, ExtendExtensionAwareInterface{.../*** Create oro_workflow_definition table** @param Schema $schema*/protected function createOroWorkflowDefinitionTable(Schema $schema){...$table->addColumn('system', 'boolean', []); // system is now a reserved word in mysql 8.0...The issue: the word “system” is now reserved in mysql 8.0. read here
Solutions?
- A simple waround would be to backtricks the column name unless the dbal will strip them off, so this doesn’t help.
- A second solution (best one) would be to use a different name but this will broke some query in the bundle, leading in following error
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘o1_.system’ in ‘field list’
during installation process, so this is not helping either!
I workaround this by renaming the column name in something like “system_” in order to have the migration process to pass, then fix the column name inside the mysql table itself (altering table and renaming the column name from “system_” to “system”, then rename again back the original name in the “createOroWorkflowDefinitionTable” function. Running the installation again will now complete without errors.I think this should be fixed or either changed the minimum system requirements for mysql<8.0.
Thanks
The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.