Base table or view not found: Migration 3.6.0 -> 4.6.2

Checklist
I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue

Issue Fixed, see comment.
During migration from 3.6.0 to 4.6.2 on Ubuntu 20.04 the migration fails to create tables for passboltdb.ui_actions, passboltdb.rbacs, passboltdb.folders_relations, passboltdb.folders.

We have a backup of the 3.6.0 db that we can restore data from, but can’t migrate from it. What commands would help migrate the schema correctly?

Server specs:

  • Ubuntu 20.04.6 LTS
  • PHP 7.4.3-4ubuntu2.20
  • Pre-migration passbolt version: ‘3.6.0 New Morning’
  • Migrated to passbolt version: ‘4.6.2 One Nation Under A Groove’

Steps taken to reproduce the issue:

  1. Upgrade with:

apt update
apt --only-upgrade install passbolt-ce-server

apt --only-upgrade install passbolt-ce-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python-certbot-nginx | python-certbot-apache
The following packages will be upgraded:
  passbolt-ce-server
1 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
Need to get 11.1 MB of archives.
After this operation, 5567 kB of additional disk space will be used.
Get:1 https://download.passbolt.com/ce/ubuntu focal/stable amd64 passbolt-ce-server all 4.6.2-1 [11.1 MB]
Fetched 11.1 MB in 0s (23.5 MB/s)
Preconfiguring packages ...
(Reading database ... 128242 files and directories currently installed.)
Preparing to unpack .../passbolt-ce-server_4.6.2-1_all.deb ...
Unpacking passbolt-ce-server (4.6.2-1) over (4.2.0-1) ...
Setting up passbolt-ce-server (4.6.2-1) ...
Installing new version of config file /etc/passbolt/Migrations/20210125212543_V320TransferFileStorageToAvatars.php ...
Installing new version of config file /etc/passbolt/Migrations/20211121231300_V340MigrateASCIIFieldsEncoding.php ...

Configuration file '/etc/passbolt/app.default.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** app.default.php (Y/I/N/O/D/Z) [default=N] ?

Configuration file '/etc/passbolt/app.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** app.php (Y/I/N/O/D/Z) [default=N] ?

Configuration file '/etc/passbolt/bootstrap.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** bootstrap.php (Y/I/N/O/D/Z) [default=N] ?

Configuration file '/etc/passbolt/default.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** default.php (Y/I/N/O/D/Z) [default=N] ?

Configuration file '/etc/passbolt/version.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** version.php (Y/I/N/O/D/Z) [default=N] ? D
--- /etc/passbolt/version.php 
+++ /etc/passbolt/version.php.dpkg-new 
@@ -1,7 +1,11 @@
 <?php
 return [
     'passbolt' => [
-        'version' => '3.6.0',
-        'name' => 'New morning'
-    ]
+        'version' => '4.6.2',
+        'name' => 'One Nation Under A Groove',
+    ],
+    'php' => [
+        'minVersion' => '7.4',
+        'nextMinVersion' => '8.1',
+    ],
 ];

Configuration file '/etc/passbolt/version.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** version.php (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/passbolt/version.php ...
PHP Deprecated:  Use of `BaseErrorHandler` and subclasses are deprecated. Upgrade to the new `ErrorTrap` and `ExceptionTrap` subsystem. See https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html
/etc/passbolt/bootstrap.php, line: 125
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `php` to `Err
or.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. in /usr/share/php/pa
ssbolt/vendor/cakephp/cakephp/src/Core/functions.php on line 318
Exception: Expected configuration key "passbolt.featurePluginAdder" not found.
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/Configure.php, line 166]

dpkg: error processing package passbolt-ce-server (--configure):
 installed passbolt-ce-server package post-installation script subprocess returned error exit status 1
Processing triggers for nginx-core (1.18.0-0ubuntu1.4) ...
Errors were encountered while processing:
 passbolt-ce-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
  1. Update /etc/passbolt/default.php with ‘featurePluginAdder’:
    'passbolt' => [
        // Edition.
        'edition' => 'ce',
        'featurePluginAdder' => \App\BaseSolutionBootstrapper::class,
  1. Migrate database schema with:

sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake migrations migrate --no-lock” www-data

PHP Deprecated:  Use of `BaseErrorHandler` and subclasses are deprecated. Upgrade to the new `ErrorTrap` and `ExceptionTrap` subsystem. See https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html
/etc/passbolt/bootstrap.php, line: 125
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php on line 318
Deprecated Error: Since 4.0.0: Cake\Database\Type is deprecated. Use Cake\Database\TypeFactory instead.
/usr/share/php/passbolt/vendor/composer/ClassLoader.php, line: 576
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/composer/ClassLoader.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only.
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php, line 318]

using migration paths
 - /etc/passbolt/Migrations
using seed paths
 - /etc/passbolt/Seeds
using environment default
using adapter mysql
using database passboltdb
ordering by creation time

 == 20230911100418 V430AddUserDisabledField: migrating
 == 20230911100418 V430AddUserDisabledField: migrated 0.4662s

 == 20231005121310 V440MobileTransferInsertUiActions: migrating
error: There was an error in V440MobileTransferInsertUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.ui_actions' doesn't exist
 == 20231005121310 V440MobileTransferInsertUiActions: migrated 0.0106s

 == 20231005123634 V440MobileTransferDefaultRbacsUiActions: migrating
error: There was an error in V440MobileTransferDefaultRbacsUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.rbacs' doesn't exist
 == 20231005123634 V440MobileTransferDefaultRbacsUiActions: migrated 0.0348s

 == 20231108114414 V441AlterUidOnGpgkeys: migrating
 == 20231108114414 V441AlterUidOnGpgkeys: migrated 0.0812s

 == 20231115235026 V441DropUserAgents: migrating
 == 20231115235026 V441DropUserAgents: migrated 0.1221s

 == 20231211195437 V450AddExpiredDateFieldToResources: migrating
 == 20231211195437 V450AddExpiredDateFieldToResources: migrated 0.1578s

 == 20240226143754 V460ShareFolderUiActions: migrating
error: There was an error in V460ShareFolderUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.ui_actions' doesn't exist
 == 20240226143754 V460ShareFolderUiActions: migrated 0.0059s

 == 20240226145601 V460ShareFolderDefaultRbacsUiActions: migrating
error: There was an error in V460ShareFolderDefaultRbacsUiActions
error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.rbacs' doesn't exist
 == 20240226145601 V460ShareFolderDefaultRbacsUiActions: migrated 0.0319s

All Done. Took 0.9221s

error.log:

error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.folders_relations' doesn't exist
error: [Cake\Database\Exception\DatabaseException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.folders_relations' doesn't exist in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Schema/Collection.php on line 160
Caused by: [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'passboltdb.folders_relations' doesn't exist in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php on line 39
Request URL: /resources/redacted.json?api-version=v2&contain%5Bsecret%5D=1&contain%5Bresource-type%5D=1

Health check logs:

sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake passbolt healthcheck"
PHP Deprecated:  Use of `BaseErrorHandler` and subclasses are deprecated. Upgrade to the new `ErrorTrap` and `ExceptionTrap` subsystem. See https://book.cakephp.org/4/en/appendices/4-4-migration-guide.html
/etc/passbolt/bootstrap.php, line: 125
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php on line 318
Deprecated Error: Since 4.0.0: Cake\Database\Type is deprecated. Use Cake\Database\TypeFactory instead.
/usr/share/php/passbolt/vendor/composer/ClassLoader.php, line: 576
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/composer/ClassLoader.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only.
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Core/functions.php, line 318]


     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
 Healthcheck shell
-------------------------------------------------------------------------------

 Environment

 [PASS] PHP version 7.4.3-4ubuntu2.20.
 [WARN] PHP version less than 8.1 will soon be not supported by passbolt, so consider upgrading your operating system or PHP environment.
 [PASS] PCRE compiled with unicode support.
 [PASS] The temporary directory and its content are writable and not executable.
 [PASS] The logs directory and its content are writable.
 [PASS] GD or Imagick extension is installed.
 [PASS] Intl extension is installed.
 [PASS] Mbstring extension is installed.

 Config files

 [PASS] The application config file is present
 [PASS] The passbolt config file is present

 Core config

 [PASS] Debug mode is off.
 [PASS] Cache is working.
 [PASS] Unique value set for security.salt
 [PASS] Full base url is set to https://redacted.com
 [PASS] App.fullBaseUrl validation OK.
 [PASS] /healthcheck/status is reachable.

 SSL Certificate

 [PASS] SSL peer certificate validates
 [PASS] Hostname is matching in SSL certificate.
 [PASS] Not using a self-signed certificate

 Database

 [PASS] The application is able to connect to the database
 [PASS] 25 tables found
 [PASS] Some default content is present
 [PASS] The database schema up to date.

 GPG Configuration
 redacted (ALL OK)

 Application configuration

 [PASS] Using latest passbolt version (4.6.2).
 [PASS] Passbolt is configured to force SSL use.
 [PASS] App.fullBaseUrl is set to HTTPS.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [INFO] The Self Registration plugin is disabled.
 [HELP] Enable the plugin in order to define self registration settings.
 [INFO] Registration is closed, only administrators can add users.
 [WARN] The deprecated self registration public setting was found in /etc/passbolt/passbolt.php.
 [HELP] You may remove the "passbolt.registration.public" setting.
 [WARN] Host availability checking is disabled.
 [HELP] Make sure this instance is not publicly available on the internet.
 [HELP] Or set the PASSBOLT_EMAIL_VALIDATE_MX environment variable to true.
 [HELP] Or set passbolt.email.validate.mx to true in /etc/passbolt/passbolt.php.
 [PASS] Serving the compiled version of the javascript app.
 [PASS] All email notifications will be sent.

 JWT Authentication

 [PASS] The JWT Authentication plugin is enabled
 [PASS] The /etc/passbolt/jwt/ directory is not writable.
 [PASS] A valid JWT key pair was found

 SMTP Settings

 [WARN] The SMTP Settings plugin is disabled. Enable the plugin in order to define SMTP settings in the database.

 [PASS] No error found. Nice one sparky!

After downgrading passbolt version and restoring database from backup:

sudo apt-get install passbolt-ce-server=3.6.0-1
mysql -u user -p passboltdb < ~/backup.sql

Running health check showed unapplied migrations in the backuped database schema, so we ran migrations first:

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake migrations migrate --no-lock" www-data
using migration paths
 - /etc/passbolt/Migrations
using seed paths
 - /etc/passbolt/Seeds
using environment default
using adapter mysql
using database passboltdb
ordering by creation time

 == 20230911100418 V430AddUserDisabledField: migrating
 == 20230911100418 V430AddUserDisabledField: migrated 0.0984s

 == 20231005121310 V440MobileTransferInsertUiActions: migrating
error: There was an error in V440MobileTransferInsertUiActions
error: Class 'Passbolt\Rbacs\Service\UiActions\UiActionsInsertDefaultsService' not found
 == 20231005121310 V440MobileTransferInsertUiActions: migrated 0.0106s

 == 20231005123634 V440MobileTransferDefaultRbacsUiActions: migrating
error: There was an error in V440MobileTransferDefaultRbacsUiActions
error: Class 'Passbolt\Rbacs\Service\Rbacs\RbacsInsertDefaultsService' not found
 == 20231005123634 V440MobileTransferDefaultRbacsUiActions: migrated 0.0050s

 == 20231108114414 V441AlterUidOnGpgkeys: migrating
 == 20231108114414 V441AlterUidOnGpgkeys: migrated 0.0320s

 == 20231115235026 V441DropUserAgents: migrating
 == 20231115235026 V441DropUserAgents: migrated 0.0218s

 == 20231211195437 V450AddExpiredDateFieldToResources: migrating
 == 20231211195437 V450AddExpiredDateFieldToResources: migrated 0.0377s

 == 20240226143754 V460ShareFolderUiActions: migrating
error: There was an error in V460ShareFolderUiActions
error: Class 'Passbolt\Rbacs\Service\UiActions\UiActionsInsertDefaultsService' not found
 == 20240226143754 V460ShareFolderUiActions: migrated 0.0052s

 == 20240226145601 V460ShareFolderDefaultRbacsUiActions: migrating
error: There was an error in V460ShareFolderDefaultRbacsUiActions
error: Class 'Passbolt\Rbacs\Service\Rbacs\RbacsInsertDefaultsService' not found
 == 20240226145601 V460ShareFolderDefaultRbacsUiActions: migrated 0.0078s

After applying pending migrations, we attempt upgrade again:

sudo apt update
sudo apt --only-upgrade install passbolt-ce-server

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python-certbot-nginx | python-certbot-apache
The following packages will be upgraded:
  passbolt-ce-server
1 upgraded, 0 newly installed, 0 to remove and 37 not upgraded.
Need to get 0 B/11.1 MB of archives.
After this operation, 12.8 MB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 127401 files and directories currently installed.)
Preparing to unpack .../passbolt-ce-server_4.6.2-1_all.deb ...
Unpacking passbolt-ce-server (4.6.2-1) over (3.6.0-1) ...
Setting up passbolt-ce-server (4.6.2-1) ...
Installing new version of config file /etc/cron.d/passbolt-ce-server ...
Installing new version of config file /etc/logrotate.d/passbolt-ce-server ...
Installing new version of config file /etc/passbolt/Migrations/20170830064410_V162InitialMigration.php ...
Installing new version of config file /etc/passbolt/Migrations/20210125212543_V320TransferFileStorageToAvatars.php ...
Installing new version of config file /etc/passbolt/Migrations/20211121231300_V340MigrateASCIIFieldsEncoding.php ...
Installing new version of config file /etc/passbolt/app.default.php ...
Installing new version of config file /etc/passbolt/app.php ...
Installing new version of config file /etc/passbolt/bootstrap.php ...
Installing new version of config file /etc/passbolt/bootstrap_cli.php ...

Configuration file '/etc/passbolt/default.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** default.php (Y/I/N/O/D/Z) [default=N] ?
Installing new version of config file /etc/passbolt/passbolt.default.php ...
Installing new version of config file /etc/passbolt/requirements.php ...
Installing new version of config file /etc/passbolt/routes.php ...
Installing new version of config file /etc/passbolt/version.php ...

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 Running migration scripts.
-------------------------------------------------------------------------------
using migration paths
 - /etc/passbolt/Migrations
using seed paths
 - /etc/passbolt/Seeds
using environment default
using adapter mysql
using database passboltdb
ordering by creation time

 == 20181024124300 V250ChangeMfaAccountSettingsDataFormat: migrating
 == 20181024124300 V250ChangeMfaAccountSettingsDataFormat: migrated 0.0205s

 == 20191119092944 V2130AddFoldersTable: migrating
 == 20191119092944 V2130AddFoldersTable: migrated 0.0760s

 == 20191119092945 V2130AddFoldersHistoryTable: migrating
 == 20191119092945 V2130AddFoldersHistoryTable: migrated 0.0325s

 == 20191216092944 V2130AddFoldersRelationsTable: migrating
 == 20191216092944 V2130AddFoldersRelationsTable: migrated 0.0344s

 == 20191216092945 V2130AddFoldersRelationsHistoryTable: migrating
 == 20191216092945 V2130AddFoldersRelationsHistoryTable: migrated 0.0309s

 == 20200205135000 V2130AddResourcesFoldersRelations: migrating
 == 20200205135000 V2130AddResourcesFoldersRelations: migrated 1.1087s

 == 20200609192000 V2130AddMissingFoldersIndexes: migrating
 == 20200609192000 V2130AddMissingFoldersIndexes: migrated 0.4343s

 == 20211121231000 V3120MigrateASCIIFieldsEncodingFolders: migrating
 == 20211121231000 V3120MigrateASCIIFieldsEncodingFolders: migrated 0.4328s

 == 20211121232400 V340AddFoldersRelationsExtraIndexes: migrating
 == 20211121232400 V340AddFoldersRelationsExtraIndexes: migrated 0.3041s

 == 20220802151030 V380AlterNameAndSlugOnResourceTypes: migrating
 == 20220802151030 V380AlterNameAndSlugOnResourceTypes: migrated 0.0696s

 == 20220802151740 V380TrimSpacesOnResourceTypesNameAndSlug: migrating
 == 20220802151740 V380TrimSpacesOnResourceTypesNameAndSlug: migrated 0.0106s

 == 20220809190030 V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance: migrating
 == 20220809190030 V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance: migrated 0.1395s

 == 20220824081645 V380AlterNameLengthOnFolders: migrating
 == 20220824081645 V380AlterNameLengthOnFolders: migrated 0.0166s

 == 20220913233909 V380SaveSmtpSettingsInDb: migrating
 == 20220913233909 V380SaveSmtpSettingsInDb: migrated 0.0047s

 == 20220915150002 V380AlterNameLengthOnFoldersHistory: migrating
 == 20220915150002 V380AlterNameLengthOnFoldersHistory: migrated 0.0135s

 == 20220922082044 V380SaveMfaOrganizationSettingsInDb: migrating
 == 20220922082044 V380SaveMfaOrganizationSettingsInDb: migrated 0.0626s

 == 20230202094451 V3110SaveMfaOrganizationSettingsInDbInDuoV4Format: migrating
 == 20230202094451 V3110SaveMfaOrganizationSettingsInDbInDuoV4Format: migrated 0.0056s

 == 20230308124720 V3120DropActionLogsDuplicateIndexes: migrating
 == 20230308124720 V3120DropActionLogsDuplicateIndexes: migrated 0.0501s

 == 20230414124720 V3122DeleteDescriptionForResourceOfTypePasswordAndDescription: migrating
 == 20230414124720 V3122DeleteDescriptionForResourceOfTypePasswordAndDescription: migrated 0.0208s

 == 20230418103007 V400AddTotpResourceTypes: migrating
 == 20230418103007 V400AddTotpResourceTypes: migrated 0.0072s

 == 20230512220600 V410ImproveFoldersRelationsIndexesShareFoldersPerformance: migrating
 == 20230512220600 V410ImproveFoldersRelationsIndexesShareFoldersPerformance: migrated 0.1504s

 == 20230601101058 V410RemoveTypeFromTotpResourceTypes: migrating
 == 20230601101058 V410RemoveTypeFromTotpResourceTypes: migrated 0.0051s

 == 20230607174200 V410DeleteRootRole: migrating
 == 20230607174200 V410DeleteRootRole: migrated 0.0058s

 == 20230607174300 V410AddRbacsTables: migrating
 == 20230607174300 V410AddRbacsTables: migrated 0.0668s

 == 20230607174301 V410InsertUiActions: migrating
 == 20230607174301 V410InsertUiActions: migrated 0.0366s

 == 20230607174302 V410InsertDefaultRbacsUiActions: migrating
 == 20230607174302 V410InsertDefaultRbacsUiActions: migrated 0.0577s

 == 20230718083939 V420AddUserIdIndexToProfiles: migrating
 == 20230718083939 V420AddUserIdIndexToProfiles: migrated 0.0648s

All Done. Took 3.2795s
Clearing default
Cleared default cache
Clearing _cake_core_
Cleared _cake_core_ cache
Clearing _cake_model_
Cleared _cake_model_ cache
Clearing default
Cleared default cache
Clearing _cake_core_
Cleared _cake_core_ cache
Clearing _cake_model_
Cleared _cake_model_ cache

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
 Cleanup shell (dry-run)
-------------------------------------------------------------------------------
2 issues found in table Comments (soft deleted users)
2 issues detected, please re-run without --dry-run to fix.
Processing triggers for nginx-core (1.18.0-0ubuntu1.4) ...

Clearing cache and starting nginx:

sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake cache clear_all"
systemctl start nginx

With healthcheck returning all OK showing successful upgrade fixing this issue.