Admin->Studio not working after upgrade from 8.5 to 8.6

I just updated smoothly to 8.6, everything seems works fine until I try to use Admin → Studio and get
Database failure. Please refer to suitecrm.log for details.

In the suitecrm.log I can find rows like this

Tue Apr 16 13:07:04 2024 [3178][1][FATAL] Mysqli_query failed.
Tue Apr 16 13:07:04 2024 [3178][1][FATAL] Query Failed: SELECT * FROM cache_rebuild WHERE cache_key=‘rebuild_all’ LIMIT 0,1: MySQL error 1146: Table ‘suitecrm.cache_rebuild’ doesn’t exist
Tue Apr 16 13:07:04 2024 [3178][1][FATAL] Fetch One Failed:SELECT * FROM cache_rebuild WHERE cache_key=‘rebuild_all’ LIMIT 0,1: MySQL error 1146: Table ‘suitecrm.cache_rebuild’ doesn’t exist
Tue Apr 16 13:07:04 2024 [3178][1][FATAL] Mysqli_query failed.
Tue Apr 16 13:07:04 2024 [3178][1][FATAL] Query Failed: SELECT * FROM cache_rebuild WHERE cache_key IN (‘app-metadata-system-configs’, ‘app-metadata-user-preferences-1’, ‘app-metadata-language-strings-en_us’, ‘app-metadata-theme-images’, ‘app-metadata-navigation-1’, ‘app-metadata-module-metadata-home-1’): MySQL error 1146: Table ‘suitecrm.cache_rebuild’ doesn’t exist

I just tryed to Quick Repair and rebuild but no way …

Please, have you any suggestions ?

Sincerly, Vincenzo

I never saw this error before, but you could try creating the table ‘suitecrm.cache_rebuild’ manually in the database (make sure it has the same access rights as the other tables).

With a bit of luck, that might get you past the problematic issue, but I fear that something didn’t quite work as intended in your upgrade…

1 Like

Sometimes, it is related to add-ons and their licenses.

1 Like

I am looking for the cache_rebuild schema or sql file to manually create the table.

I found this suitecrm Database but there is no cache_rebuild table :frowning:

Where can I found more info ?

Vincenzo

No, that is definitely not up to date, and it’s for v7, not v8.

Your best chance is a clean installation, that should have everything in place.

1 Like

Wow, I have all my data, a lot of custom fields …I just terminated importing years of data from Sugarcrm to SuiteCRM. A clean installation will reset everything :sob:

I have snapshots of my AWS instance, I’ll try to use them and repeat the upgrade process.

I will share my experience in the next days, thanks @pgr

Hey @vincenzo,

Did you run the ./bin/console suitecrm:app:upgrade-finalize -t "<version>" command when upgrading? (from SuiteDocs UpgradeGuide - 2.3. Run the post upgrade command )

Why upgrade-finalize?

By searching the code I found that this table should be added by the following Migration Version20231117113210.php

And the migrations seem to be run on the RunMigrations step which is part of the upgrade-finalize at least that is what it looks like by looking at the code from core/backend/Install/Service/Upgrade/Steps/RunMigrations.php

class RunMigrations implements UpgradeStepInterface
{
    ... 
    public const STAGE = 'upgrade-finalize';

These migrations seem like regular doctrine migrations from the DoctrineMigrationsBundle.

Running the migration separately?

You probably can also try running

php bin/console doctrine:migrations:execute "App\Migrations\Version20231117113210" --dry-run
2 Likes

THANK YOU !!

I run the command

sudo ./bin/console suitecrm:app:upgrade-finalize -t suitecrm-8-6-0

and my Admin → Studio now works !

I am really happy, sorry I didn’t read all the documentation regarding post upgrade command.

have a nice day :grinning:

2 Likes