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

History 517

  1. Alexander Opitz changed assigned to Alexander Opitz 04/04/23, 09:21

  2. Gerrit Code Review pushed patch set 1 for main to change 78447 status New Under Review 04/04/23, 13:14

  3. Gerrit Code Review pushed patch set 2 for main to change 78447 04/04/23, 13:32

  4. Gerrit Code Review pushed patch set 3 for main to change 78447 04/05/23, 12:20

  5. Gerrit Code Review pushed patch set 4 for main to change 78447 04/05/23, 12:21

  6. Oliver Klee changed Related to #100491 04/05/23, 21:33

  7. Gerrit Code Review pushed patch set 5 for main to change 78447 04/07/23, 12:43

  8. Gerrit Code Review pushed patch set 6 for main to change 78447 04/28/23, 12:31

  9. Gerrit Code Review pushed patch set 7 for main to change 78447 04/30/23, 08:34

  10. Gerrit Code Review pushed patch set 8 for main to change 78447 05/02/23, 11:38

  11. Gerrit Code Review pushed patch set 9 for main to change 78447 05/03/23, 09:50

  12. Gerrit Code Review pushed patch set 10 for main to change 78447 06/13/23, 07:26

  13. Markus Klein changed TYPO3 Version 12 11 06/13/23, 07:26

  14. Gerrit Code Review pushed patch set 1 for 11.5 to change 79301 06/13/23, 07:53

  15. Gerrit Code Review pushed patch set 1 for 12.4 to change 79354 06/14/23, 12:15

  16. Alexander Opitz commented and changed status Under Review Resolved done 0 % 100 % 06/14/23, 12:25

    Applied in changeset commit:22d9db30d7ca70f19f724f97fbac4a41c748534b.

  17. Benni Mack changed status Resolved Closed 07/09/24, 12:55