Failed update missing table

I tried to update my Atropim and I’ve got this error :

19.06.2024 07:39:28 | Failed! There is no table with name ‘atrocore.contact’ in the schema. {“file”:“/var/www/atropim-lom/vendor/doctrine/dbal/src/Schema/Schema.php”,“line”:189,“function”:“tableDoesNotExist”,“class”:“Doctrine\DBAL\Schema\SchemaException”,“type”:“::”}

The complete log for the update :

19.06.2024 07:38:40 | Loading composer repositories with package information
19.06.2024 07:38:41 | Creating restore point
19.06.2024 07:38:53 | Updating dependencies
19.06.2024 07:39:11 | Package operations: 9 installs, 20 updates, 9 removals
  - Removing webmozart/assert (1.11.0)
  - Removing symfony/workflow (v5.4.28)
  - Removing laminas/laminas-validator (2.25.0)
  - Removing laminas/laminas-stdlib (3.13.0)
  - Removing laminas/laminas-servicemanager (3.17.0)
  - Removing laminas/laminas-mime (2.10.0)
  - Removing laminas/laminas-mail (2.16.0)
  - Removing laminas/laminas-loader (2.8.0)
  - Removing atrocore/compatibilities (1.0.2)
  - Updating symfony/polyfill-php80 (v1.28.0 => v1.29.0): 
  - Updating symfony/deprecation-contracts (v2.5.2 => v2.5.3): 
  - Updating symfony/polyfill-mbstring (v1.28.0 => v1.29.0): 
  - Updating symfony/polyfill-intl-normalizer (v1.28.0 => v1.29.0): 
  - Updating symfony/polyfill-ctype (v1.28.0 => v1.29.0): 
  - Updating symfony/event-dispatcher-contracts (v2.5.2 => v2.5.3): 
  - Updating symfony/event-dispatcher (v5.4.26 => v5.4.40): 
  - Updating paragonie/constant_time_encoding (v2.6.3 => v2.7.0): 
  - Updating phpseclib/phpseclib (3.0.23 => 3.0.38): 
  - Updating symfony/polyfill-php72 (v1.28.0 => v1.29.0): 
  - Updating symfony/polyfill-intl-idn (v1.28.0 => v1.29.0): 
  - Updating ezyang/htmlpurifier (v4.16.0 => v4.17.0): 
  - Updating caxy/php-htmldiff (v0.1.14 => v0.1.15): 
  - Installing symfony/service-contracts (v2.5.3): 
  - Installing symfony/mime (v5.4.40): 
  - Installing doctrine/lexer (1.2.3): 
  - Installing egulias/email-validator (3.2.6): 
  - Installing symfony/mailer (v5.4.40): 
  - Installing ralouphie/getallheaders (3.0.3): 
  - Updating psr/http-factory (1.0.2 => 1.1.0): 
  - Installing guzzlehttp/psr7 (2.6.2): 
  - Installing atrocore/atrocore-legacy (1.0.6): 
  - Updating atrocore/core (1.6.49 => 1.10.32): 
  - Updating atrocore/dam (1.5.22 => 1.8.3): 
  - Updating atrocore/pim (1.9.55 => 1.13.15): 
  - Updating twig/twig (v3.7.1 => v3.10.3): 
  - Installing jdorn/sql-formatter (v1.2.16): 
  - Updating atrocore/export-feeds (1.7.27 => 1.8.11): 
  - Updating atrocore/import-feeds (1.5.28 => 1.6.11): 
19.06.2024 07:39:22 | Writing lock file
19.06.2024 07:39:22 | Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
> \Atro\Composer\PostUpdate::postUpdate
19.06.2024 07:39:22 | Updating list of used modules
19.06.2024 07:39:22 | Copying post-install & post-delete scripts for modules
19.06.2024 07:39:24 | Copying migration scripts
19.06.2024 07:39:24 | Clearing cache
19.06.2024 07:39:25 | Copying frontend files
19.06.2024 07:39:25 | Run migration Atro 1.6.51
19.06.2024 07:39:26 | Run migration Atro 1.6.54
19.06.2024 07:39:26 | Run migration Atro 1.7.34
19.06.2024 07:39:26 | Run migration Atro 1.7.35
19.06.2024 07:39:26 | Run migration Atro 1.7.36
19.06.2024 07:39:26 | Run migration Atro 1.7.37
19.06.2024 07:39:26 | Run migration Atro 1.8.2
19.06.2024 07:39:26 | Run migration Atro 1.8.3
19.06.2024 07:39:26 | Run migration Atro 1.8.6
19.06.2024 07:39:27 | Run migration Atro 1.8.7
19.06.2024 07:39:27 | Run migration Atro 1.8.8
19.06.2024 07:39:27 | Run migration Atro 1.8.10
19.06.2024 07:39:27 | Run migration Atro 1.8.12
19.06.2024 07:39:28 | Run migration Atro 1.6.55
19.06.2024 07:39:28 | Run migration Atro 1.8.14
19.06.2024 07:39:28 | Run migration Atro 1.8.15
19.06.2024 07:39:28 | Failed! There is no table with name 'atrocore.contact' in the schema. {"file":"\/var\/www\/atropim-lom\/vendor\/doctrine\/dbal\/src\/Schema\/Schema.php","line":189,"function":"tableDoesNotExist","class":"Doctrine\\DBAL\\Schema\\SchemaException","type":"::"}
19.06.2024 07:39:28 | Restoring database
Report a Bug | Community | Help Center | Support | Сontact Us© AtroCore is based on EspoCRM | AtroСore: 1.6.49

How can I solve this ?

Thanks !

We had this issue also. Auto updates had stopped as we did not have unzip on the server.

With Supports help we resolved the issue. You can see the steps here Missing Column after Update · Issue #1285 · atrocore/atrocore · GitHub. You need to upgrade in steps. I think from the steps listed we also went to the last version with assets, then upgraded to the version with files.

If you are on a VM, take snapshots before each install. We had a lot of retries before we got it right and snapshots are much quicker than restores.

Just an update - another thing that came to mind. I found that with the failures happening when trying to update so much from a version around yours, the restore points do not work properly when the database is restored. We had lots of similar errors to you when trying to upgrade through the defined path. That was because we were trying to upgrade a db that had not been restored correctly.

We were only successful once we restored to a clean install of the old version, then upgraded through the path defined in the issue plus the extra step. As said, once you restore, take a snapshot then you can roll back very quickly if you need to.

Thanks a lot Paultvis, thanks to you, I managed to upgrade to version 1.9.22 of Atrocore, but I can’t upgrade to a higher version, unfortunately, I have this logs :

20.06.2024 13:01:51 | Loading composer repositories with package information
20.06.2024 13:01:52 | Creating restore point
20.06.2024 13:02:05 | Updating dependencies
20.06.2024 13:02:16 | Package operations: 0 installs, 5 updates, 1 removal

  • Removing atrocore/dam (1.8.3)
  • Updating atrocore/compatibilities (1.0.5 => 1.0.6):
  • Updating atrocore/core (1.9.22 => 1.10.0):
  • Updating atrocore/pim (1.12.14 => 1.13.0):
  • Updating atrocore/export-feeds (1.7.76 => 1.8.6):
  • Updating atrocore/import-feeds (1.5.69 => 1.6.5):
    20.06.2024 13:02:17 | Writing lock file
    20.06.2024 13:02:17 | Generating autoload files
    composer/package-versions-deprecated: Generating version class…
    composer/package-versions-deprecated: …done generating version class

\Atro\Composer\PostUpdate::postUpdate
20.06.2024 13:02:17 | Updating list of used modules
20.06.2024 13:02:17 | Copying post-install & post-delete scripts for modules
20.06.2024 13:02:17 | Copying migration scripts
20.06.2024 13:02:17 | Clearing cache
20.06.2024 13:02:18 | Copying frontend files
20.06.2024 13:02:18 | Run migration Export 1.8.6
20.06.2024 13:02:18 | Run migration Atro 1.10.0
20.06.2024 13:02:19 | Failed! An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘priority’ in ‘where clause’
20.06.2024 13:02:19 | Restoring database

I did what you said, save snapshot of the VM, rebuild database between each step, don’t use an Atropim instance with a “restored” database.

So, we did you follow
Step 1: Set version of core 1.7.0 then update.
Step 2: After success update go to administration and press Rebuild. Wait success.
Step 3: Go to module manager and set 1.7.14 for core and update again
Step 4: After success update go to administration and press Rebuild. Wait success.
Step 5: Go to Module manager and set ^1.7.14 for core and update

We then went to 19.22 as you have and upgraded, that went ok.

I would recommend doing a full restore of your db and app servers to a date before you tried your first update then start from there. And as said, check the user activity after the rebuilds to check they are actually finished

One other thing I have also remembered, some of the database rebuilds take a long time. The gui shows that they are complete but I started checking the connections at the db until I could see that the atro user was not running any queries.

After 1.9.22, we went to 1.10.0. That was a major change, then upgraded from there to the current version

After a break because I had to work on other subject, I’m still blocked when I run the upgrade from 1.9.22 to 1.10.0. I tried many times and I don’t know what to do now. I follow all the instruction from Paulvis and from the topic “How to update the system after a long-term interval”

The output is still this one :

23.08.2024 08:32:32 | Loading composer repositories with package information
23.08.2024 08:32:32 | Creating restore point
23.08.2024 08:32:46 | Updating dependencies
23.08.2024 08:33:00 | Package operations: 0 installs, 5 updates, 1 removal

  • Removing atrocore/dam (1.8.3)
  • Updating atrocore/compatibilities (1.0.5 => 1.0.6):
  • Updating atrocore/core (1.9.22 => 1.10.0):
  • Updating atrocore/pim (1.12.14 => 1.13.0):
  • Updating atrocore/export-feeds (1.7.76 => 1.8.6):
  • Updating atrocore/import-feeds (1.5.69 => 1.6.5):
    23.08.2024 08:33:01 | Writing lock file
    23.08.2024 08:33:01 | Generating autoload files
    composer/package-versions-deprecated: Generating version class…
    composer/package-versions-deprecated: …done generating version class

\Atro\Composer\PostUpdate::postUpdate
23.08.2024 08:33:01 | Updating list of used modules
23.08.2024 08:33:01 | Copying post-install & post-delete scripts for modules
23.08.2024 08:33:01 | Copying migration scripts
23.08.2024 08:33:01 | Clearing cache
23.08.2024 08:33:02 | Copying frontend files
23.08.2024 08:33:03 | Run migration Export 1.8.6
23.08.2024 08:33:03 | Run migration Atro 1.10.0
23.08.2024 08:33:04 | Failed! An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘priority’ in ‘where clause’
23.08.2024 08:33:04 | Restoring database

Anyone has a new idea to help me out ?