Upgrade not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • greenstones
    Junior Member
    • Mar 2017
    • 16

    Upgrade not working

    Attempting to upgrade from 4.5.0 to 4.5.1

    The error is:

    [2017-04-30 14:41:38] Espo.ERROR: Fault to rebuild database schema. Details: Unknown database type enum requested, Espo\Core\Utils\Database\DBAL\Platforms\MySqlPlatf orm may not support it.

    [2017-04-30 14:41:38] Espo.ERROR: API [POST]:/:controller/action/:action, Params:Array ( [controller] => Admin [action] => runUpgrade ) , InputData: {"id":"5905f7a02a8c7"} - Error while rebuilding database. See log file for details. [] []

    [2017-04-30 14:41:38] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /espo/api/v1/Admin/action/runUpgrade [] []

    How do I fix this?
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    Possible it helps https://github.com/espocrm/espocrm/issues/217

    Comment

    • greenstones
      Junior Member
      • Mar 2017
      • 16

      #3
      Originally posted by tanya
      I have made that change and rebuild still does not work.

      Comment

      • greenstones
        Junior Member
        • Mar 2017
        • 16

        #4
        Originally posted by greenstones

        I have made that change and rebuild still does not work.
        I have been working on this for over a month now and am starting to despair! I've made an sql dump of the database. Could you please point me to instructions for how to import an old database in to a new 4.6.0 install? I've tried to simply recover the database and Espo does not run.

        [2017-05-02 08:31:02] Espo.ERROR: Uncaught Exception PDOException: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'scheduled_job.is_internal' in 'field list'" at /var/www/html/evabiallas.com/espo/application/Espo/ORM/DB/Mapper.php line 72 {"exception":"[object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'scheduled_job.is_internal' in 'field list' at /var/www/html/evabiallas.com/espo/application/Espo/ORM/DB/Mapper.php:72)"} []

        Comment

        • tanya
          Senior Member
          • Jun 2014
          • 4308

          #5
          Better install new version 4.5.0 and try to upgrade it to 4.6.0.
          If everything is ok, install new 4.5.0, relate it to the old database (create a dump before), and upgrade crm to the newest version.
          Next copy custom folder from the old instance to new one and Rebuild the system.

          Possible you have to reset users password.

          Comment

          • greenstones
            Junior Member
            • Mar 2017
            • 16

            #6
            Originally posted by tanya
            Better install new version 4.5.0 and try to upgrade it to 4.6.0.
            If everything is ok, install new 4.5.0, relate it to the old database (create a dump before)
            Clean install of 4.5.0. During installation when I connect it to the old database I get an Ajax Error.

            Comment

            • tanya
              Senior Member
              • Jun 2014
              • 4308

              #7
              All information, please
              php version, mysql version, what customization you did, what version of EspoCRM do you have first, any installed extensions and version, and everything could be important
              Last edited by tanya; 05-02-2017, 09:49 AM.

              Comment

              • greenstones
                Junior Member
                • Mar 2017
                • 16

                #8
                Originally posted by tanya
                All information, please
                php version, mysql version, what customization you did, whфе version of EspoCRM do you have first, any installed extensions and version, and everything could be important
                PHP 7.1.4
                First version of EspoCRM 4.5.0
                no extensions installed

                I can do a clean install fine.

                I'm happy to send you the sql dump so you can test it yourself. Do I need to set a specific encoding when importing?

                Comment

                • greenstones
                  Junior Member
                  • Mar 2017
                  • 16

                  #9
                  I've now managed to restore the 4.5.0 version with a functioning database.

                  I cannot upgrade however. I've applied the patch above and get:

                  [2017-05-02 10:09:00] Espo.ERROR: Uncaught Exception Error: "Call to a member function hasDoctrineTypeMappingFor() on null" at /var/www/html/evabiallas.com/espo/application/Espo/Core/Utils/Database/Schema/Schema.php line 188 {"exception":"[object] (Error(code: 0): Call to a member function hasDoctrineTypeMappingFor() on null at /var/www/html/evabiallas.com/espo/application/Espo/Core/Utils/Database/Schema/Schema.php:188)"} []

                  [2017-05-02 10:09:02] Espo.ERROR: Uncaught Exception Error: "Call to a member function hasDoctrineTypeMappingFor() on null" at /var/www/html/evabiallas.com/espo/application/Espo/Core/Utils/Database/Schema/Schema.php line 188 {"exception":"[object] (Error(code: 0): Call to a member function hasDoctrineTypeMappingFor() on null at /var/www/html/evabiallas.com/espo/application/Espo/Core/Utils/Database/Schema/Schema.php:188)"} []

                  Comment

                  • tanya
                    Senior Member
                    • Jun 2014
                    • 4308

                    #10
                    mysql version?
                    send me a private message with a link to the dump of your database

                    Comment

                    • greenstones
                      Junior Member
                      • Mar 2017
                      • 16

                      #11
                      Originally posted by tanya
                      mysql version?
                      MySQL version 5.5.52

                      Comment

                      • tanya
                        Senior Member
                        • Jun 2014
                        • 4308

                        #12
                        I got ajax error too. After I deleted weird tables in database start with "pma_", everything went right.

                        Comment

                        • greenstones
                          Junior Member
                          • Mar 2017
                          • 16

                          #13
                          Originally posted by tanya
                          I got ajax error too. After I deleted weird tables in database start with "pma_", everything went right.
                          Not sure where they came from! Maybe I tested an extension.

                          I've deleted them now - still can't rebuild the databases. "Bad Server Response".

                          Comment

                          • greenstones
                            Junior Member
                            • Mar 2017
                            • 16

                            #14
                            Originally posted by greenstones

                            Not sure where they came from! Maybe I tested an extension.

                            I've deleted them now - still can't rebuild the databases. "Bad Server Response".
                            Update: deleted the patch to schema.php and the upgrade proceeded smoothly.

                            So I guess those pma tables were the culprit. Thanks for your help - much appreciated!

                            Comment

                            • tanya
                              Senior Member
                              • Jun 2014
                              • 4308

                              #15
                              Originally posted by greenstones
                              no extensions installed
                              install new espocrm 4.5.0. and set database you used before

                              Comment

                              Working...