Issue Bug Closed

#100428TYPO3 v12 Database Upgrade is never fulfilled

Alexander Opitz 04/04/23, 08:57 updated 07/09/24, 12:55

Description

On TYPO3 12.3.0 running the command ‘vendor/bin/typo3 upgrade:run’ leads to the error message

“Error running Database Up-to-Date. Please ensure this prerequisite manually and try again.”

This is repetitive, as we only “add” database changes here but no indexes. The issue was introduced in https://review.typo3.org/c/Packages/TYPO3.CMS/+/58128 in file https://review.typo3.org/c/Packages/TYPO3.CMS/+/58128/10/typo3/sysext/install/Classes/Updates/DatabaseUpdatedPrerequisite.php and function ensure()

        $result = null;
        if (count($adds) > 0) {
            $this->output->writeln('Performing ' . count($adds) . ' database operations.');
            $result = $this->upgradeWizardsService->addMissingTablesAndFields();
        }
        return $result === null;

The addMissingTablesAndFields() returns an empty array, if no errors exists, so we try to check empty array against null. Uncool.

Reviews 4