Hallo,
Shopware 6 Installation bricht beim importieren von Datenbank (beim Schritt 130) ab.
mit diesen Error.
woran könnte es liegen ?
Installation wird bei einem managed server durchgeführt.
Error
Received an error message. URL: importDatabase Message:
Please try to fix this error and restart the update.
Response
{„valid“:false,„errorMsg“:„An exception occurred while executing ‚ALTER TABLE order MODIFY COLUMN language_id BINARY(16) NOT NULL‘:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‚c1shopwaredb.o.order_date_time‘ in ‚GENERATED ALWAYS‘“}
Würde mich auch interessieren. Habe eben an der selben Stelle den Fehler bei der Installation erhalten:
Error
Received an error message. URL: importDatabase Message:
Please try to fix this error and restart the update.
Response
{„valid“:false,„errorMsg“:„An exception occurred while executing ‚ALTER TABLE order MODIFY COLUMN language_id BINARY(16) NOT NULL‘:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‚DB.o.price‘ in ‚CHECK‘“}
Das ist nur eine Variable für die Tabelle „order“. Offensichtlich wurde beim Install die Spalte „order_date_time“ nicht angelegt. Könnte man zwar jetzt händisch machen, aber ich vermute das noch weitere Fehler bestehen.
Selbes Problem, die DB ist MariaDB 10.4 und PHP7.4.18. Habe dann versucht Shopware V6.3.5.4 und V6.3.5.3 komplett neu auf einem Testserver zu installieren und es kommt derselbe Fehler. Hat also wohl nichts mit 6.4.0.0 zu tun.
Hier das log:
117/346 [=========âââââââââââââââââââ] 33%16:58:39 ERROR [app] Migration: "Shopware\Core\Migration\Migration1563805586AddLanguageToOrder" failed: "An exception occurred while executing 'ALTER TABLE `order` MODIFY COLUMN `language_id` BINARY(16) NOT NULL':
SQLSTATE[42S22]: Column not found: 1054 Unknown column '`shopware`.`o`.`price`' in 'CHECK'"
---------- ----------------------
Action Number of migrations
---------- ----------------------
Migrated 130 out of 346
---------- ----------------------
In MigrationCommand.php line 152:
Migration error: An exception occurred while executing 'ALTER TABLE `order`
MODIFY COLUMN `language_id` BINARY(16) NOT NULL':
SQLSTATE[42S22]: Column not found: 1054 Unknown column '`shopware`.`o`.`pri
ce`' in 'CHECK'
Trace:
#0 /var/www/html/sw6/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.p
hp(166): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException()
#1 /var/www/html/sw6/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.p
hp(146): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/html/sw6/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(
1069): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/html/sw6/vendor/shopware/platform/src/Core/Migration/Migration1
563805586AddLanguageToOrder.php(30): Doctrine\DBAL\Connection->executeUpdat
e()
#4 /var/www/html/sw6/vendor/shopware/platform/src/Core/Framework/Migration/
MigrationRuntime.php(47): Shopware\Core\Migration\Migration1563805586AddLan
guageToOrder->update()
#5 /var/www/html/sw6/vendor/shopware/platform/src/Core/Framework/Migration/
Command/MigrationCommand.php(47): Shopware\Core\Framework\Migration\Migrati
onRuntime->migrate()
#6 /var/www/html/sw6/vendor/shopware/platform/src/Core/Framework/Migration/
Command/MigrationCommand.php(145): Shopware\Core\Framework\Migration\Comman
d\MigrationCommand->getMigrationGenerator()
#7 /var/www/html/sw6/vendor/shopware/platform/src/Core/Framework/Migration/
Command/MigrationCommand.php(99): Shopware\Core\Framework\Migration\Command
\MigrationCommand->runMigrationForIdentifier()
#8 /var/www/html/sw6/vendor/symfony/console/Command/Command.php(255): Shopw
are\Core\Framework\Migration\Command\MigrationCommand->execute()
#9 /var/www/html/sw6/vendor/symfony/console/Application.php(1027): Symfony\
Component\Console\Command\Command->run()
#10 /var/www/html/sw6/vendor/symfony/framework-bundle/Console/Application.p
hp(97): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/html/sw6/vendor/symfony/console/Application.php(273): Symfony\
Bundle\FrameworkBundle\Console\Application->doRunCommand()
#12 /var/www/html/sw6/vendor/symfony/framework-bundle/Console/Application.p
hp(83): Symfony\Component\Console\Application->doRun()
#13 /var/www/html/sw6/vendor/symfony/console/Application.php(149): Symfony\
Bundle\FrameworkBundle\Console\Application->doRun()
#14 /var/www/html/sw6/bin/console(48): Symfony\Component\Console\Applicatio
n->run()
#15 {main}
In AbstractMySQLDriver.php line 60:
An exception occurred while executing 'ALTER TABLE `order` MODIFY COLUMN `l
anguage_id` BINARY(16) NOT NULL':
SQLSTATE[42S22]: Column not found: 1054 Unknown column '`shopware`.`o`.`pri
ce`' in 'CHECK'
In PDOConnection.php line 43:
SQLSTATE[42S22]: Column not found: 1054 Unknown column '`shopware`.`o`.`pri
ce`' in 'CHECK'
In PDOConnection.php line 41:
SQLSTATE[42S22]: Column not found: 1054 Unknown column '`shopware`.`o`.`pri
ce`' in 'CHECK'
database:migrate [-all|--all] [-u|--until [UNTIL]] [-l|--limit [LIMIT]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<identifier>...]
Execution aborted, a subcommand failed!
Hier noch das migration script das den Fehler verursacht:
<?php declare(strict_types=1);
namespace Shopware\Core\Migration;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Migration\MigrationStep;
class Migration1563805586AddLanguageToOrder extends MigrationStep
{
public function getCreationTimestamp(): int
{
return 1563805586;
}
public function update(Connection $connection): void
{
$connection->executeUpdate('ALTER TABLE `order` ADD `language_id` BINARY(16) AFTER `currency_id`');
$connection->executeUpdate(
'UPDATE `order` AS `o` SET `o`.`language_id` = COALESCE((
SELECT `language_id` FROM `customer` AS `c`
LEFT JOIN `order_customer` AS `oc`
ON `c`.`id` = `oc`.`customer_id` WHERE `oc`.`order_id` = `o`.`id` LIMIT 1
), (SELECT `id` FROM `language` AS `l`
LEFT JOIN `sales_channel_language` AS `scl`
ON `l`.`id` = `scl`.`language_id` WHERE `scl`.`sales_channel_id` = `o`.`sales_channel_id` LIMIT 1
))'
);
$connection->executeUpdate('ALTER TABLE `order` MODIFY COLUMN `language_id` BINARY(16) NOT NULL');
$connection->executeUpdate('ALTER TABLE `order` ADD CONSTRAINT `fk.language_id` FOREIGN KEY (`language_id`)
REFERENCES `language` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE');
}
public function updateDestructive(Connection $connection): void
{
}
}
Kann da jemand was erkennen?
EDIT: Der Fehler kommt auch, wenn man direkt in der mysql console den Befehl ALTER TABLE 'order' MODIFY COLUMN 'language_id' BINARY(16) NOT NULL;
ausführt.
Ich habe genau das gleiche Problem mit einer Neuinstallation. Mehrfach mit verschiedenen PHP- und MariaDB-Versionen ausprobiert.
Der Installationsvorgang bricht bei Heft 130 mit dem folgenden Fehler ab:
Error
Received an error message. URL: importDatabase Message:
Please try to fix this error and restart the update.
Response
{„valid“:false,„errorMsg“:„An exception occurred while executing ‚ALTER TABLE order MODIFY COLUMN language_id BINARY(16) NOT NULL‘:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‚gyhyxatfjk.o.order_date_time‘ in ‚GENERATED ALWAYS‘“}
Ich habe dasselbe Problem, habe auch schon andere Shopware 6 Versionen ausprobiert. Ist überall das gleiche.
Habe auch schon verschiedene Berechtigungen der MySQL User Versucht sowie die Datenbank gelöscht neu angelegt usw. Die Anforderungen werden erfüllt.