Error running upgrade wizard after upgrading from v2021 to v2023

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
loeffe1
Posts: 52
Joined: 21 Feb 2020, 10:33

Error running upgrade wizard after upgrading from v2021 to v2023

Post by loeffe1 » 08 Mar 2024, 09:17

I am getting this error when running the upgrade wizard

Code: Select all

An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'customerref' cannot be null #0 /var/www/html/vendor/doctrine/dbal/src/Connection.php(1943): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert() #1 /var/www/html/vendor/doctrine/dbal/src/Connection.php(1885): Doctrine\DBAL\Connection->handleDriverException() #2 /var/www/html/vendor/doctrine/dbal/src/Connection.php(1213): Doctrine\DBAL\Connection->convertExceptionDuringQuery() #3 /var/www/html/vendor/aimeos/upscheme/src/Schema/DB.php(267): Doctrine\DBAL\Connection->executeStatement() #4 /var/www/html/vendor/aimeos/aimeos-core/setup/OrderMergeBaseTable.php(34): Aimeos\Upscheme\Schema\DB->exec() #5 /var/www/html/vendor/aimeos/upscheme/src/Up.php(341): Aimeos\Upscheme\Task\OrderMergeBaseTable->up() #6 /var/www/html/vendor/aimeos/upscheme/src/Up.php(328): Aimeos\Upscheme\Up->runTasks() #7 /var/www/html/vendor/aimeos/upscheme/src/Up.php(328): Aimeos\Upscheme\Up->runTasks() #8 /var/www/html/vendor/aimeos/upscheme/src/Up.php(328): Aimeos\Upscheme\Up->runTasks() #9 /var/www/html/vendor/aimeos/upscheme/src/Up.php(172): Aimeos\Upscheme\Up->runTasks() #10 /var/www/html/vendor/aimeos/aimeos-core/Setup.php(84): Aimeos\Upscheme\Up->up() #11 /var/www/html/vendor/aimeos/aimeos-typo3/Classes/Setup.php(148): Aimeos\Setup->up() #12 /var/www/html/vendor/aimeos/aimeos-typo3/Classes/Setup.php(77): Aimeos\Aimeos\Setup::execute() #13 /var/www/html/vendor/typo3/cms-install/Classes/Service/UpgradeWizardsService.php(275): Aimeos\Aimeos\Setup->executeUpdate() #14 /var/www/html/vendor/typo3/cms-install/Classes/Controller/UpgradeController.php(1098): TYPO3\CMS\Install\Service\UpgradeWizardsService->executeWizard() #15 /var/www/html/vendor/typo3/cms-install/Classes/Middleware/Maintenance.php(234): TYPO3\CMS\Install\Controller\UpgradeController->upgradeWizardsExecuteAction() #16 /var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php(111): TYPO3\CMS\Install\Middleware\Maintenance->process() #17 /var/www/html/vendor/typo3/cms-core/Classes/Middleware/NormalizedParamsAttribute.php(41): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #18 /var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php(162): TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process() #19 /var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php(70): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #20 /var/www/html/vendor/typo3/cms-core/Classes/Http/AbstractApplication.php(80): TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle() #21 /var/www/html/vendor/typo3/cms-install/Classes/Http/Application.php(46): TYPO3\CMS\Core\Http\AbstractApplication->handle() #22 /var/www/html/vendor/typo3/cms-core/Classes/Http/AbstractApplication.php(92): TYPO3\CMS\Install\Http\Application->handle() #23 /var/www/html/public/typo3/install.php(19): TYPO3\CMS\Core\Http\AbstractApplication->run() #24 /var/www/html/public/typo3/install.php(20): {closure}() #25 {main}
Prior to running the upgrade wizard, I executed ./vendor/bin/typo3 aimeos:setup

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Error running upgrade wizard after upgrading from v2021 to v2023

Post by aimeos » 08 Mar 2024, 11:00

loeffe1 wrote: 08 Mar 2024, 09:17 I am getting this error when running the upgrade wizard

Code: Select all

Column 'customerref' cannot be null
Prior to running the upgrade wizard, I executed ./vendor/bin/typo3 aimeos:setup
Guess, it will be the same when you execute the aimeos:setup command from the command line again.
What is the output of "SHOW CREATE TABLE mshop_order"?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
loeffe1
Posts: 52
Joined: 21 Feb 2020, 10:33

Re: Error running upgrade wizard after upgrading from v2021 to v2023

Post by loeffe1 » 11 Mar 2024, 14:39

Yes, this will give me the same error:

Image

Here is what SHOW CREATE TABLE mshop_order displays:

Code: Select all

CREATE TABLE `mshop_order` (
 `id` bigint(20) NOT NULL AUTO_INCREMENT,
 `baseid` bigint(20) NOT NULL,
 `siteid` varchar(255) COLLATE utf8mb4_bin NOT NULL,
 `channel` varchar(16) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `datepayment` datetime DEFAULT NULL,
 `datedelivery` datetime DEFAULT NULL,
 `statuspayment` smallint(6) DEFAULT -1,
 `statusdelivery` smallint(6) DEFAULT -1,
 `relatedid` varchar(36) COLLATE utf8mb4_bin DEFAULT '',
 `cdate` varchar(10) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `cmonth` varchar(7) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `cweek` varchar(7) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `cwday` varchar(1) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `chour` varchar(2) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `ctime` datetime NOT NULL,
 `mtime` datetime NOT NULL,
 `editor` varchar(255) COLLATE utf8mb4_bin NOT NULL,
 `sitecode` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `customerid` varchar(36) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `invoiceno` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `langid` varchar(5) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `currencyid` varchar(3) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `price` decimal(12,2) NOT NULL DEFAULT 0.00,
 `costs` decimal(12,2) NOT NULL DEFAULT 0.00,
 `rebate` decimal(12,2) NOT NULL DEFAULT 0.00,
 `tax` decimal(14,4) NOT NULL DEFAULT 0.0000,
 `taxflag` smallint(6) NOT NULL DEFAULT 1,
 `customerref` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `comment` text COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 PRIMARY KEY (`id`),
 KEY `idx_msord_sid_mtime_pstat` (`siteid`,`mtime`,`statuspayment`),
 KEY `idx_msord_sid_mtime_dstat` (`siteid`,`mtime`,`statusdelivery`),
 KEY `idx_msord_sid_dstatus` (`siteid`,`statusdelivery`),
 KEY `idx_msord_sid_ddate` (`siteid`,`datedelivery`),
 KEY `idx_msord_sid_pdate` (`siteid`,`datepayment`),
 KEY `idx_msord_sid_editor` (`siteid`,`editor`),
 KEY `idx_msord_sid_cdate` (`siteid`,`cdate`),
 KEY `idx_msord_sid_cmonth` (`siteid`,`cmonth`),
 KEY `idx_msord_sid_cweek` (`siteid`,`cweek`),
 KEY `idx_msord_sid_cwday` (`siteid`,`cwday`),
 KEY `idx_msord_sid_chour` (`siteid`,`chour`),
 KEY `fk_msord_baseid` (`baseid`),
 KEY `idx_msord_sid_ctime_pstat` (`siteid`,`ctime`,`statuspayment`),
 KEY `idx_msord_channel_sid` (`channel`,`siteid`),
 KEY `idx_msord_custid_sid` (`customerid`,`siteid`),
 KEY `idx_msord_custid_scode` (`customerid`,`sitecode`),
 KEY `idx_msord_ctime_pstat_sid` (`ctime`,`statuspayment`,`siteid`),
 KEY `idx_msord_mtime_pstat_sid` (`mtime`,`statuspayment`,`siteid`),
 KEY `idx_msord_mtime_dstat_sid` (`mtime`,`statusdelivery`,`siteid`),
 KEY `idx_msord_dstat_sid` (`statusdelivery`,`siteid`),
 KEY `idx_msord_ddate_sid` (`datedelivery`,`siteid`),
 KEY `idx_msord_pdate_sid` (`datepayment`,`siteid`),
 KEY `idx_msord_editor_sid` (`editor`,`siteid`),
 KEY `idx_msord_cdate_sid` (`cdate`,`siteid`),
 KEY `idx_msord_cmonth_sid` (`cmonth`,`siteid`),
 KEY `idx_msord_cweek_sid` (`cweek`,`siteid`),
 KEY `idx_msord_cwday_sid` (`cwday`,`siteid`),
 KEY `idx_msord_chour_sid` (`chour`,`siteid`),
 CONSTRAINT `fk_msord_baseid` FOREIGN KEY (`baseid`) REFERENCES `mshop_order_base` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29616 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Error running upgrade wizard after upgrading from v2021 to v2023

Post by aimeos » 12 Mar 2024, 08:23

Can you please update:

Code: Select all

composer req aimeos/aimeos-core:2023.10.x-dev
We've changed the customerref column to allow NULL values again in the schema.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
loeffe1
Posts: 52
Joined: 21 Feb 2020, 10:33

Re: Error running upgrade wizard after upgrading from v2021 to v2023

Post by loeffe1 » 20 Mar 2024, 10:48

Thanks, that fixed it!

Post Reply