View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006823 | OXID eShop (all versions) | 4.01. Database handling | public | 2018-05-01 19:23 | 2023-01-05 10:57 |
Reporter | smxsm | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 6.0.2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0006823: Migrations broken | ||||
Description | It looks like the migration functionality is broken in 6.0.2., no matter what migration (CE, EE, PE, PR) is executed, it always leads to a fatal error: PHP Fatal error: Uncaught Doctrine\DBAL\Driver\Mysqli\MysqliException: Unsupported option '1002' with value 'SET @@SESSION.sql_mode=''' in ... /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php:237 It looks like this commit is responsible for the bug: https://github.com/OXID-eSales/oxideshop-doctrine-migration-wrapper/commit/cc9d230b8098c5ea53e4251e1b7951df565bee3b | ||||
Steps To Reproduce | Just call e.g. ./vendor/bin/oe-eshop-db_migrate migrations:migrate EE The migrations will not run, but a fatal error will be reported in error_log.txt | ||||
Tags | doctrine, error, fatal, migration | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Not reproducible: Tested 6.0.2 CE > PE > EE Maybe wrong paramater. It should look like this (no edition at the end): vendor/bin/oe-eshop-db_migrate migrations:migrate |
|
Makes no difference, even without parameter the migrations give me fatal errors, also if I set an environment parameter "MIGRATION_SUITE" as explained here: https://docs.oxid-esales.com/developer/en/6.0/oxid_components/migrations.html |
|
Reproducable when using mysqli instead of pdo_mysql as database type. Steps to reproduce: config.inc.php: $this->dbType = 'mysqli' ./vendor/bin/oe-eshop-db_migrate migrations:migrate Loading configuration from command option: /var/www/html/e602/vendor/oxid-esales/oxideshop-facts/src/Config/../../../../../vendor/oxid-esales/oxideshop-ee/migration/migrations.yml PHP Fatal error: Uncaught Doctrine\DBAL\Driver\Mysqli\MysqliException: Unsupported option '1002' with value 'SET @@SESSION.sql_mode=''' in /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php:237 Stack trace: #0 /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php(66): Doctrine\DBAL\Driver\Mysqli\MysqliConnection->setDriverOptions(Array) #1 /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php(36): Doctrine\DBAL\Driver\Mysqli\MysqliConnection->__construct(Array, 'root', 'root', Array) #2 /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\Mysqli\Driver->connect(Array, 'root', 'root', Array) #3 /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): Doctrine\DBAL\Connection->connect() #4 /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #5 /var/www/html/e602/vendor/do in /var/www/html/e602/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 115 |
|
We solved the mystery in the skype channel - since the project is a migration, we somehow ended up with $this->dbType = 'mysqli'; in config.inc.php - if I change that to $this->dbType = 'pdo_mysql'; the migrations are running again :) Thanks @Michael Keiluweit! |
|
It's not fixed, because we only support PDO as a driver. https://docs.oxid-esales.com/developer/en/latest/development/modules_components_themes/project/configincphp.html#dbtype |