Error updating to 9.2.6 today.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dev77
    Senior Member
    • Feb 2018
    • 137

    #1

    Error updating to 9.2.6 today.

    Very strange. I have a production Espo install with its own database. I also have a second BACKUP Espo install with ITS own database.The systmes have always been in sync for a long time. I've been updating the backup database every time there is a change to the production database.

    I've run the Espo upgrade scripts a zillion times over the years. Never a problem.

    Today I a mable to upgrade the production system but NOT the backup system. I get:

    Current version is 9.2.5.
    EspoCRM will be upgraded to version 9.2.6 now. Enter [Y] to continue.
    Y
    This may take a while. Do not close the terminal.
    Downloading...
    Upgrading...
    Initialization...
    Reverting...
    Error: Rebuild is failed. Fix all errors before upgrade.

    The log says (in part).

    [2026-01-15 20:40:55] ERROR: (0) Failed to rebuild database schema. Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.; /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:452 :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php(452)


    [2026-01-15 20:40:55] ERROR: (500) Database rebuild failure, details: Error while rebuilding database. See log file for details.. :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/application/Espo/Core/DataManager.php(141)


    What is wrong with the backup database? How do I fix it?

    Thanks
  • lazovic
    Super Moderator
    • Jan 2022
    • 1205

    #2
    Hi dev77,

    Please specify which version of MySQL you are using, and we will try to reproduce and solve this problem.

    Comment

    • dev77
      Senior Member
      • Feb 2018
      • 137

      #3
      According to EspoCRM Administration, Settings and About screen I'm running EspoCrm Version 9.2.6

      MySQL Version 8.0.44 Success

      and
      PHP Version 8.4.11 Success

      What I did yesterday is copy the updated 'production' 9.2.6 site and copied it over the the backup directory, but saved the "internal settings" of the 'broken" version and used that and all it works fine. Of course I didn't try the update since there was no reason to.

      I see that today there is a new update, 9.2.7 but I have not tried that... I'll wait a few days to see in another update comes out... 9.2.8 maybe?

      I'll report back here when I try another update (via terminal command).

      (I've been using Espo for many, many years... and am very technical.... so I'll be happy to help in any way I can.)

      Comment

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9570

        #4
        There were no any changes in 9.2.6 and 9.2.7 that could cause this problem. Absolutely nothing special. No need to wait for 9.2.8. I highly recommend to upgrade to the latest version anyway.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • dev77
          Senior Member
          • Feb 2018
          • 137

          #5
          Do you have any idea what the problem was that gave me those error messages? For years and years I'm updated the production version and the backup version at the same time... first the production and then the backup. This is the first time something like this has happened. Very strange. I'll do the 9.2.7 update later this morning and report back.

          Comment

          • dev77
            Senior Member
            • Feb 2018
            • 137

            #6
            I got the same error as before. It must be an issue with the database on the backup install. The production version worked great.

            Current version is 9.2.6.
            EspoCRM will be upgraded to version 9.2.7 now. Enter [Y] to continue.
            Y
            This may take a while. Do not close the terminal.
            Downloading...
            Upgrading...
            Initialization...
            Reverting...
            Error: Rebuild is failed. Fix all errors before upgrade.

            I'll backup and truncate the backup database and reload it from the ... which I do via a script each time there is a change to the production... so I don't know how that will help:

            /usr/local/bin/mysql --login-path=espocrmbak ancnet1_espobak < /usr/home/ancnet1/cpp_bak/temp/espodb-db-1768565045964-db.sql

            This works because the changes from the production database are seen in the backup database.

            When I go to the backup system the data looks OK but when I got to Admin and try the Rebuild I get this error:

            Error 500
            Error while rebuilding database. See log file for details.

            Here is the log for today:

            [2026-01-16 17:16:32] ERROR: (0) Failed to rebuild database schema. Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.; /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:452 :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php(452)
            [2026-01-16 17:16:32] ERROR: (500) Database rebuild failure, details: Error while rebuilding database. See log file for details.. :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/application/Espo/Core/DataManager.php(141)
            [2026-01-16 17:16:32] ERROR: (0) Failed to rebuild database schema. Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.; /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:452 :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php(452)
            [2026-01-16 17:16:32] ERROR: (500) Database rebuild failure, details: Error while rebuilding database. See log file for details.. :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/application/Espo/Core/DataManager.php(141)
            [2026-01-16 17:16:32] ERROR: Upgrade Error: Error: Rebuild is failed. Fix all errors before upgrade.
            [2026-01-16 17:27:03] WARNING: E_WARNING: unlink(data/cache/application/classmapControllers.php): No such file or directory
            [2026-01-16 17:27:40] ERROR: (0) Failed to rebuild database schema. Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.; /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:452 :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php(452)
            [2026-01-16 17:27:40] ERROR: (500) Error while rebuilding database. See log file for details. :: POST /Admin/rebuild :: /usr/home/ancnet1/public_html/anc77.pairsite.com/espocrm2/application/Espo/Core/DataManager.php(141)


            So why is the update failing on this backup install... never happened before.

            What does this mean?

            Failed to rebuild database schema. Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it

            Google says:

            The error "Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it" occurs because the Doctrine DBAL library does not natively support the MySQL ENUM data type for schema inspection and management. Doctrine expects to work with its own defined types.
            To resolve this issue, you need to map the ENUM type to a supported Doctrine type, such as string or varchar.

            Search is here: https://tinyurl.com/vsfd8pb9

            Any ideas on what to do?
            Last edited by dev77; Yesterday, 06:41 PM.

            Comment

            • dev77
              Senior Member
              • Feb 2018
              • 137

              #7

              SOLVED, SOLVED

              I don't know why this worked but it did.

              I told you that I have been updating the backup database every time there was an change to a record in the production database. I was using the usual construct:

              mysql -u [username] -p < backup.sql

              It has worked for years and years and years.

              Since I could NOT update Espo to 9.2.7 AND I was getting errors on trying to rebuild the (backup) database I figure it must be the backup database... but I can't figure out why since it should have been a mirror image of the production database... given the command above.

              So I did the following:

              ===

              Via phpMyAdmin I download (mysqldump) the production database to a .sql file.

              Via my host's admin panel, I created a brand new empty database.

              Via phpMyAdmin I imported the above .sql file into the new database.

              I then went in and changed the items for the new database in the config-internal.php file for the backup system.

              I then opened the backup espo system to make sure it worked... which it did. I tried an Admin, Rebuild... which worked!

              I then did the standard CLI update for 9.2.7 from the terminal... and it worked.

              ===

              I cannot figure out how the backup database could be any different (or corrupted) from the production database since I use the standard mysql command (above). Does anyone know?

              Comment

              Working...