# Update passbolt

**URL:** <https://community.passbolt.com/t/update-passbolt/6205>\
**Category:** Installation Issues\
**Created:** [December 14, 2022, 11:20am UTC](https://community.passbolt.com/t/update-passbolt/6205 "2022-12-14T11:20:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![q.prestavoine](https://avatars.discourse-cdn.com/v4/letter/q/41988e/32.png) [@q.prestavoine](https://community.passbolt.com/u/q.prestavoine)\
**Post date:** [December 14, 2022, 11:20am UTC](https://community.passbolt.com/t/update-passbolt/6205/1 "2022-12-14T11:20:07Z")

</div>

Hello,

I tried to update passbolt today and an error has occured :

PHP version : 7.3  
OS : CentOS 7 x86\_64

root@src-coffre:/var/www/passbolt# sudo -H -u nginx bash -c “./bin/cake passbolt migrate”

using migration paths

- /var/www/passbolt/config/Migrations  
using seed paths
- /var/www/passbolt/config/Seeds  
using environment default  
using adapter mysql  
using database passbolt  
ordering by creation time

== 20220809190030 V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance: migrating

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name ‘foreign\_id’ in /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:193  
Stack trace:  
#0 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(193): PDO-\>exec()  
#1 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(108): Phinx\Db\Adapter\PdoAdapter-\>execute()  
#2 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(611): Phinx\Db\Util\AlterInstructions-\>execute()  
#3 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(972): Phinx\Db\Adapter\PdoAdapter-\>executeAlterSteps()  
#4 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(484): Phinx\Db\Adapter\PdoAdapter-\>executeActions()  
#5 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(420): Phinx\Db\Adapter\AdapterWrapper-\>executeActions()  
#6 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(484): Phinx\Db\Adapter\TimedOutputAdapter-\>executeActions()  
#7 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(151): Phinx\Db\Adapter\AdapterWrapper-\>executeActions()  
#8 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(715): Phinx\Db\Plan\Plan-\>execute()  
#9 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(623): Phinx\Db\Table-\>executeActions()  
#10 /var/www/passbolt/vendor/cakephp/migrations/src/Table.php(152): Phinx\Db\Table-\>update()  
#11 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(682): Migrations\Table-\>update()  
#12 /var/www/passbolt/config/Migrations/20220809190030\_V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance.php(41): Phinx\Db\Table-\>save()  
#13 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance-\>up()  
#14 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(385): Phinx\Migration\Manager\Environment-\>executeMigration()  
#15 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager-\>executeMigration()  
#16 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager-\>migrate()  
#17 /var/www/passbolt/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate-\>execute()  
#18 /var/www/passbolt/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate-\>parentExecute()  
#19 /var/www/passbolt/vendor/symfony/console/Command/Command.php(298): Migrations\Command\Phinx\Migrate-\>execute()  
#20 /var/www/passbolt/vendor/symfony/console/Application.php(1028): Symfony\Component\Console\Command\Command-\>run()  
#21 /var/www/passbolt/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application-\>doRunCommand()  
#22 /var/www/passbolt/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application-\>doRun()  
#23 /var/www/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application-\>run()  
#24 /var/www/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(179): Migrations\Command\MigrationsCommand-\>execute()  
#25 /var/www/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand-\>run()  
#26 /var/www/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(271): Migrations\Command\MigrationsCommand-\>run()  
#27 /var/www/passbolt/src/Command/DatabaseAwareCommandTrait.php(62): Cake\Console\BaseCommand-\>executeCommand()  
#28 /var/www/passbolt/src/Command/MigrateCommand.php(82): App\Command\MigrateCommand-\>runMigrationsMigrateCommand()  
#29 /var/www/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(179): App\Command\MigrateCommand-\>execute()  
#30 /var/www/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(334): Cake\Console\BaseCommand-\>run()  
#31 /var/www/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner-\>runCommand()  
#32 /var/www/passbolt/bin/cake.php(12): Cake\Console\CommandRunner-\>run()  
#33 {main}

Do you have any idea to find an issue ?

Thanks for advance,

Regards,

Quentin

---

<div class="post-metadata">

**Author:** ![clayton](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@clayton](https://community.passbolt.com/u/clayton)\
**Post date:** [December 14, 2022, 11:44am UTC](https://community.passbolt.com/t/update-passbolt/6205/2 "2022-12-14T11:44:15Z")

</div>

Hey @q.prestavoine welcome to the community forum!

Based on the table in question it looks like you have the Pro version of Passbolt. If you’ve got a valid subscription and you’d like to you can contact us directly at [support@passbolt.com](mailto:support@passbolt.com) to work with you on this.

Just to collect a bit more information on this could you let me know which version of MySQL/MariaDB you are using for this?

Also, what is the output of running `SHOW INDEX FROM folders_relations;` on the database?

---

<div class="post-metadata">

**Author:** ![q.prestavoine](https://avatars.discourse-cdn.com/v4/letter/q/41988e/32.png) [@q.prestavoine](https://community.passbolt.com/u/q.prestavoine)\
**Post date:** [December 14, 2022, 11:54am UTC](https://community.passbolt.com/t/update-passbolt/6205/3 "2022-12-14T11:54:55Z")

</div>

Hello @clayton,

 ![Capture](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/c/c2397c1b4d75848dd8788a202167caca75875680.png)

---

<div class="post-metadata">

**Author:** ![clayton](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@clayton](https://community.passbolt.com/u/clayton)\
**Post date:** [December 15, 2022, 3:12pm UTC](https://community.passbolt.com/t/update-passbolt/6205/4 "2022-12-15T15:12:27Z")

</div>

Spoke with @q.prestavoine and we got through this migration and update. Posting the steps below just so anyone who searches this out can see what was done.

First step was

```auto
git pull origin master

```

on the passbolt directory  
Then edited the `Migrations/20220809190030_V372ImproveFoldersRelationsIndexesAddItemsToUserTreePerformance.php` file to remove the migrations that were stuck, in this case it was lines 17 through 41

Then did the migrations manually by running the following in MySQL on the passbolt database:

```auto
DROP INDEX foreign_id ON folders_relations;
DROP INDEX foreign_id_2 ON folders_relations;
CREATE INDEX foreign_id ON folders_relations (foreign_id, folder_parent_id, created);

```

Then proceeded with the update instructions from [here](https://help.passbolt.com/hosting/update/install-scripts.html)

---

<div class="post-metadata">

**Author:** ![Morgoth](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Morgoth](https://community.passbolt.com/u/Morgoth)\
**Post date:** [October 31, 2023, 9:36am UTC](https://community.passbolt.com/t/update-passbolt/6205/5 "2023-10-31T09:36:43Z")

</div>

I have a similar issue but with “foreign\_model”

error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name ‘foreign\_model’ in /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php on line 192  
Request URL: /install/installation/do\_install.json

What can I do?

 ![Bildschirmfoto 2023-10-31 um 11.08.57](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/e/ecd5650b06f362d10bedf27283c7ad4774db0017.png)

---

<div class="post-metadata">

**Author:** ![remy](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/remy/32/17_2.png) [@remy](https://community.passbolt.com/u/remy)\
**Post date:** [October 31, 2023, 10:11am UTC](https://community.passbolt.com/t/update-passbolt/6205/6 "2023-10-31T10:11:09Z")

</div>

> [@Morgoth](#):
>
> I have a similar issue but with “foreign\_model”

Hello,

Can you create a new thread with the answers to the questions (like OS versions, DB engine and version, etc.) Thanks,

---

<div class="post-metadata">

**Author:** ![Morgoth](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Morgoth](https://community.passbolt.com/u/Morgoth)\
**Post date:** [October 31, 2023, 10:14am UTC](https://community.passbolt.com/t/update-passbolt/6205/7 "2023-10-31T10:14:02Z")

</div>

sure, sorry 🙂

> [@The specified index on columns 'foreign\_model' does not exist](https://community.passbolt.com/t/the-specified-index-on-columns-foreign-model-does-not-exist/8758):
>
> Hi I have trouble with that, could everyone help me? sudo -su nginx bash -c "./bin/cake passbolt migrate --backup" == 20230512220600 V410ImproveFoldersRelationsIndexesShareFoldersPerformance: migrating InvalidArgumentException: The specified index on columns ‘foreign\_model’ does not exist in /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php:726 Stack trace: #0 /var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(942): Phinx\Db\Adapter\My…
