Announcement

Collapse
No announcement yet.

Upgrade error from 4.4.1 to 4.5.1

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrade error from 4.4.1 to 4.5.1

    Hi!

    When trying to upgrade from version 4.4.1 to 4.5.1 I'm getting this error:
    Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'espocrm.inbound_email_team' doesn't exist

    How to fix this?

    Thanks a lot!

  • #2
    Hello,
    if you run Rebuild in Administration, do you have any error?

    Comment


    • #3
      Hi Tanya!
      Thanks for your quick reply!
      No, I'm getting the green message: Rebuild has been done.

      Comment


      • #4
        Each time you try to upgrade you have the same error? Did you try second time?

        Comment


        • #5
          Yes! I've tried it 8 times. It's always the same error.

          Comment


          • #6
            In this upgrade this table has to be created. And after it has to be filled.

            Try to create this table manually in mysql before upgrade.

            CREATE TABLE `inbound_email_team` (
            `id` int(11) NOT NULL,
            `inbound_email_id` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL,
            `team_id` varchar(24) COLLATE utf8_unicode_ci DEFAULT NULL,
            `deleted` tinyint(1) DEFAULT '0'
            ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

            Comment


            • #7
              Hi Tanya!

              Thanks a lot! This solved the problem! :-)
              Don't know why the table didn't exist yet.
              The only feature that doesn't seem to work is LastViewed in the user menu. It's showing a error 404 when clicking on it.

              When going through the upgrade process, everything worked fine until 4.8.4 to 5.05. Now I'm getting the following error:
              Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field' in 'where clause'

              I'm so sorry for posting again, but I don't know how to proceed here. May you help me again, please?
              Last edited by marcussmith; 06-22-2018, 04:01 PM.

              Comment


              • #8
                it's very weird. Could you download the version 4.8.4 (version, not upgrade)? (your current upgraded version)
                After extract it and replace folders application, vendor and client.
                Set correct permission.
                Rebuild in administration. Clear local cache. Refresh the page.

                Check Last Viewed feature.

                If you have no error, try to continue upgrading process.

                Comment


                • #9
                  [2018-06-25 10:06:25] Espo.ALERT: Rebuild database fault: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key in /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699 Stack trace: #0 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(699): PDO->query('ALTER TABLE `in...') #1 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Database/Schema/Schema.php(215): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `in...') #2 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(93): Espo\Core\Utils\Database\Schema\Schema->rebuild(NULL) #3 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(60): Espo\Core\DataManager->rebuildDatabase(NULL) #4 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Controllers/Admin.php(51): Espo\Core\DataManager->rebuild() #5 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/ControllerManager.php(116): Espo\Controllers\Admin->postActionRebuild(Array, '', Object(Slim\Http\Request)) #6 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Application.php(226): Espo\Core\ControllerManager->process('Admin', 'rebuild', Array, '', Object(Slim\Http\Request)) #7 [internal function]: Espo\Core\Application->Espo\Core\{closure}() #8 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array) #9 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1356): Slim\Slim->applyHook('slim.before.dis...') #10 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #11 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #12 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Auth.php(112): Slim\Middleware\MethodOverride->call() #13 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Slim.php(125): Espo\Core\Utils\Api\Auth->call() #14 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Application.php(88): Espo\Core\Utils\Api\Slim->run() #15 /var/www/vhosts/agencycomnet.com/httpdocs/crm/api/v1/index.php(33): Espo\Core\Application->run() #16 {main} Next Doctrine\DBAL\DBALException: An exception occurred while executing 'ALTER TABLE `inbound_email_team` CHANGE `id` id INT AUTO_INCREMENT NOT NULL': SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key in /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91 Stack trace: #0 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(702): Doctrine\DBAL\DBALException::driverExceptionDuring Query(Object(PDOException), 'ALTER TABLE `in...', Array) #1 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Database/Schema/Schema.php(215): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `in...') #2 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(93): Espo\Core\Utils\Database\Schema\Schema->rebuild(NULL) #3 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(60): Espo\Core\DataManager->rebuildDatabase(NULL) #4 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Controllers/Admin.php(51): Espo\Core\DataManager->rebuild() #5 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/ControllerManager.php(116): Espo\Controllers\Admin->postActionRebuild(Array, '', Object(Slim\Http\Request)) #6 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Application.php(226): Espo\Core\ControllerManager->process('Admin', 'rebuild', Array, '', Object(Slim\Http\Request)) #7 [internal function]: Espo\Core\Application->Espo\Core\{closure}() #8 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array) #9 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1356): Slim\Slim->applyHook('slim.before.dis...') #10 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #11 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #12 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Auth.php(112): Slim\Middleware... [] []
                  [2018-06-25 10:06:25] Espo.ALERT: Rebuild database fault: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' in /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699 Stack trace: #0 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(699): PDO->query('ALTER TABLE `in...') #1 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Database/Schema/Schema.php(215): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `in...') #2 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(93): Espo\Core\Utils\Database\Schema\Schema->rebuild(NULL) #3 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(60): Espo\Core\DataManager->rebuildDatabase(NULL) #4 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Controllers/Admin.php(51): Espo\Core\DataManager->rebuild() #5 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/ControllerManager.php(116): Espo\Controllers\Admin->postActionRebuild(Array, '', Object(Slim\Http\Request)) #6 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Application.php(226): Espo\Core\ControllerManager->process('Admin', 'rebuild', Array, '', Object(Slim\Http\Request)) #7 [internal function]: Espo\Core\Application->Espo\Core\{closure}() #8 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array) #9 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1356): Slim\Slim->applyHook('slim.before.dis...') #10 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #11 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #12 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Auth.php(112): Slim\Middleware\MethodOverride->call() #13 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Slim.php(125): Espo\Core\Utils\Api\Auth->call() #14 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Application.php(88): Espo\Core\Utils\Api\Slim->run() #15 /var/www/vhosts/agencycomnet.com/httpdocs/crm/api/v1/index.php(33): Espo\Core\Application->run() #16 {main} Next Doctrine\DBAL\DBALException: An exception occurred while executing 'ALTER TABLE `inbound_email_team` ADD PRIMARY KEY (id)': SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' in /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91 Stack trace: #0 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(702): Doctrine\DBAL\DBALException::driverExceptionDuring Query(Object(PDOException), 'ALTER TABLE `in...', Array) #1 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Database/Schema/Schema.php(215): Doctrine\DBAL\Connection->executeQuery('ALTER TABLE `in...') #2 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(93): Espo\Core\Utils\Database\Schema\Schema->rebuild(NULL) #3 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/DataManager.php(60): Espo\Core\DataManager->rebuildDatabase(NULL) #4 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Controllers/Admin.php(51): Espo\Core\DataManager->rebuild() #5 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/ControllerManager.php(116): Espo\Controllers\Admin->postActionRebuild(Array, '', Object(Slim\Http\Request)) #6 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Application.php(226): Espo\Core\ControllerManager->process('Admin', 'rebuild', Array, '', Object(Slim\Http\Request)) #7 [internal function]: Espo\Core\Application->Espo\Core\{closure}() #8 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1210): call_user_func_array(Object(Closure), Array) #9 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Slim.php(1356): Slim\Slim->applyHook('slim.before.dis...') #10 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call() #11 /var/www/vhosts/agencycomnet.com/httpdocs/crm/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call() #12 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Auth.php(112): Slim\Middleware\MethodOverride->call() #13 /var/www/vhosts/agencycomnet.com/httpdocs/crm/application/Espo/Core/Utils/Api/Slim.php(125): Espo\Core... [] []
                  [2018-06-25 10:06:25] Espo.ERROR: API [POST]:/Admin/rebuild, Params:Array ( ) , InputData: - Error while rebuilding database. See log file for details. [] []
                  [2018-06-25 10:06:25] Espo.ERROR: Display Error: Error while rebuilding database. See log file for details., Code: 500 URL: /api/v1/Admin/rebuild [] []

                  Comment


                  • #10
                    tanya: I've completed your steps and rebuilt the app via rebuild.php in CLI. Last Viewed is working now.

                    However, when trying to rebuild the backend from the admin panel, I'm getting the error above.

                    Do you know how to fix this?

                    Comment


                    • #11
                      could you attach your database structure?

                      Comment


                      • #12
                        could you rebuild in CLI now?

                        Comment


                        • #13
                          Yes, CLI rebuild seems to work without errors as before.
                          But rebuilding via admin panel is still showing the error.

                          Will attach it in the next few minutes.

                          Comment


                          • #14
                            Here it is!
                            To make it more comfortable for you, it's a visual representation. :-)
                            ExpireBox is the best free temporary file hosting service, you can share big files with family, friends or colleagues. Your file will be deleted after 2 days.

                            Comment


                            • #15
                              When you run rebuild in CLI, what user did you use? the same as server or root? check twice the permissions.
                              Also could be the problem, if php for cli and php for web is different.
                              and, if it's possible, extract structure in sql. I need indexes as well. And I want to test it, not just to watch

                              Comment

                              Working...
                              X