# Error after upgrade from 1.6.10 to 2.0.7

**URL:** <https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661>\
**Category:** Installation Issues\
**Created:** [May 11, 2018, 8:52am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661 "2018-05-11T08:52:36Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![cedric](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/cedric/32/3868_2.png) [@cedric](https://community.passbolt.com/u/cedric)\
**Post date:** [May 16, 2018, 10:34am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/22 "2018-05-16T10:34:37Z")

</div>

What do you see when you’re executing the mysql command `show tables` now?

---

<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:** [May 16, 2018, 10:35am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/23 "2018-05-16T10:35:22Z")

</div>

Could you also run, the following so that we can see if there are some issues with specific fields:

```auto
SELECT table_schema, table_name, column_name, character_set_name, collation_name FROM information_schema.columns where table_schema='passbolt' ORDER BY table_schema, table_name,ordinal_position;

```

Replace ‘passbolt’ by the name of your database.

---

<div class="post-metadata">

**Author:** ![jpmdwx](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jpmdwx](https://community.passbolt.com/u/jpmdwx)\
**Post date:** [May 16, 2018, 10:39am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/24 "2018-05-16T10:39:55Z")

</div>

@remy the output of the command you say:

mysql\> SELECT table\_schema, table\_name, column\_name, character\_set\_name, collation\_name FROM information\_schema.columns where table\_schema=‘passbolt’ ORDER BY table\_schema, table\_name,ordinal\_position;  
±-------------±-----------------------------±----------------±-------------------±------------------+  
| table\_schema | table\_name | column\_name | character\_set\_name | collation\_name |  
±-------------±-----------------------------±----------------±-------------------±------------------+  
| passbolt | authentication\_tokens | id | utf8 | utf8\_unicode\_ci |  
| passbolt | authentication\_tokens | token | utf8 | utf8\_unicode\_ci |  
| passbolt | authentication\_tokens | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | authentication\_tokens | active | NULL | NULL |  
| passbolt | authentication\_tokens | created | NULL | NULL |  
| passbolt | authentication\_tokens | modified | NULL | NULL |  
| passbolt | authentication\_tokens | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | authentication\_tokens | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | burzum\_file\_storage\_phinxlog | version | NULL | NULL |  
| passbolt | burzum\_file\_storage\_phinxlog | migration\_name | utf8 | utf8\_general\_ci |  
| passbolt | burzum\_file\_storage\_phinxlog | start\_time | NULL | NULL |  
| passbolt | burzum\_file\_storage\_phinxlog | end\_time | NULL | NULL |  
| passbolt | burzum\_file\_storage\_phinxlog | breakpoint | NULL | NULL |  
| passbolt | cake\_sessions | id | latin1 | latin1\_swedish\_ci |  
| passbolt | cake\_sessions | data | latin1 | latin1\_swedish\_ci |  
| passbolt | cake\_sessions | expires | NULL | NULL |  
| passbolt | comments | id | utf8 | utf8\_unicode\_ci |  
| passbolt | comments | parent\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | comments | foreign\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | comments | foreign\_model | utf8 | utf8\_unicode\_ci |  
| passbolt | comments | content | utf8 | utf8\_unicode\_ci |  
| passbolt | comments | created | NULL | NULL |  
| passbolt | comments | modified | NULL | NULL |  
| passbolt | comments | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | comments | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | id | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | role\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | level | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | method | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | controller | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | action | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | user\_agent\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | ip | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | request\_data | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | message | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | scope | utf8 | utf8\_unicode\_ci |  
| passbolt | controller\_logs | created | NULL | NULL |  
| passbolt | email\_queue | id | ascii | ascii\_general\_ci |  
| passbolt | email\_queue | to | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | from\_name | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | from\_email | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | subject | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | config | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | template | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | layout | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | format | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | template\_vars | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | headers | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue | sent | NULL | NULL |  
| passbolt | email\_queue | locked | NULL | NULL |  
| passbolt | email\_queue | send\_tries | NULL | NULL |  
| passbolt | email\_queue | send\_at | NULL | NULL |  
| passbolt | email\_queue | created | NULL | NULL |  
| passbolt | email\_queue | modified | NULL | NULL |  
| passbolt | email\_queue\_phinxlog | version | NULL | NULL |  
| passbolt | email\_queue\_phinxlog | migration\_name | utf8 | utf8\_general\_ci |  
| passbolt | email\_queue\_phinxlog | start\_time | NULL | NULL |  
| passbolt | email\_queue\_phinxlog | end\_time | NULL | NULL |  
| passbolt | email\_queue\_phinxlog | breakpoint | NULL | NULL |  
| passbolt | favorites | id | utf8 | utf8\_unicode\_ci |  
| passbolt | favorites | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | favorites | foreign\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | favorites | foreign\_model | utf8 | utf8\_unicode\_ci |  
| passbolt | favorites | created | NULL | NULL |  
| passbolt | file\_storage | id | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | user\_id | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | foreign\_key | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | model | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | filename | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | filesize | NULL | NULL |  
| passbolt | file\_storage | mime\_type | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | extension | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | hash | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | path | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | adapter | latin1 | latin1\_swedish\_ci |  
| passbolt | file\_storage | created | NULL | NULL |  
| passbolt | file\_storage | modified | NULL | NULL |  
| passbolt | gpgkeys | id | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | key | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | bits | NULL | NULL |  
| passbolt | gpgkeys | uid | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | key\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | fingerprint | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | type | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | expires | NULL | NULL |  
| passbolt | gpgkeys | key\_created | NULL | NULL |  
| passbolt | gpgkeys | deleted | NULL | NULL |  
| passbolt | gpgkeys | created | NULL | NULL |  
| passbolt | gpgkeys | modified | NULL | NULL |  
| passbolt | gpgkeys | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | gpgkeys | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | groups | id | utf8 | utf8\_unicode\_ci |  
| passbolt | groups | name | utf8 | utf8\_unicode\_ci |  
| passbolt | groups | deleted | NULL | NULL |  
| passbolt | groups | created | NULL | NULL |  
| passbolt | groups | modified | NULL | NULL |  
| passbolt | groups | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | groups | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | groups\_users | id | utf8 | utf8\_unicode\_ci |  
| passbolt | groups\_users | group\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | groups\_users | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | groups\_users | is\_admin | NULL | NULL |  
| passbolt | groups\_users | created | NULL | NULL |  
| passbolt | groups\_users | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | id | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | aco | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | aco\_foreign\_key | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | aro | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | aro\_foreign\_key | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | type | NULL | NULL |  
| passbolt | permissions | created | NULL | NULL |  
| passbolt | permissions | modified | NULL | NULL |  
| passbolt | permissions | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions\_types | id | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions\_types | serial | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions\_types | name | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions\_types | description | utf8 | utf8\_unicode\_ci |  
| passbolt | permissions\_types | active | NULL | NULL |  
| passbolt | phinxlog | version | NULL | NULL |  
| passbolt | phinxlog | migration\_name | utf8 | utf8\_general\_ci |  
| passbolt | phinxlog | start\_time | NULL | NULL |  
| passbolt | phinxlog | end\_time | NULL | NULL |  
| passbolt | phinxlog | breakpoint | NULL | NULL |  
| passbolt | profiles | id | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | gender | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | date\_of\_birth | NULL | NULL |  
| passbolt | profiles | title | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | first\_name | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | last\_name | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | timezone | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | locale | utf8 | utf8\_unicode\_ci |  
| passbolt | profiles | created | NULL | NULL |  
| passbolt | profiles | modified | NULL | NULL |  
| passbolt | resources | id | utf8 | utf8\_unicode\_ci |  
| passbolt | resources | name | utf8 | utf8\_unicode\_ci |  
| passbolt | resources | username | utf8 | utf8\_unicode\_ci |  
| passbolt | resources | expiry\_date | NULL | NULL |  
| passbolt | resources | uri | utf8 | utf8\_unicode\_ci |  
| passbolt | resources | description | utf8 | utf8\_unicode\_ci |  
| passbolt | resources | deleted | NULL | NULL |  
| passbolt | resources | created | NULL | NULL |  
| passbolt | resources | modified | NULL | NULL |  
| passbolt | resources | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | resources | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | roles | id | utf8 | utf8\_unicode\_ci |  
| passbolt | roles | name | utf8 | utf8\_unicode\_ci |  
| passbolt | roles | description | utf8 | utf8\_unicode\_ci |  
| passbolt | roles | created | NULL | NULL |  
| passbolt | roles | modified | NULL | NULL |  
| passbolt | schema\_migrations | id | NULL | NULL |  
| passbolt | schema\_migrations | class | utf8 | utf8\_unicode\_ci |  
| passbolt | schema\_migrations | type | utf8 | utf8\_unicode\_ci |  
| passbolt | schema\_migrations | created | NULL | NULL |  
| passbolt | secrets | id | utf8 | utf8\_unicode\_ci |  
| passbolt | secrets | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | secrets | resource\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | secrets | data | utf8 | utf8\_unicode\_ci |  
| passbolt | secrets | created | NULL | NULL |  
| passbolt | secrets | modified | NULL | NULL |  
| passbolt | secrets | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | secrets | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | users | id | utf8 | utf8\_unicode\_ci |  
| passbolt | users | role\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | users | username | utf8 | utf8\_unicode\_ci |  
| passbolt | users | active | NULL | NULL |  
| passbolt | users | deleted | NULL | NULL |  
| passbolt | users | created | NULL | NULL |  
| passbolt | users | modified | NULL | NULL |  
| passbolt | users | created\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | users | modified\_by | utf8 | utf8\_unicode\_ci |  
| passbolt | users\_resources\_permissions | user\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | users\_resources\_permissions | resource\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | users\_resources\_permissions | permission\_id | utf8 | utf8\_unicode\_ci |  
| passbolt | users\_resources\_permissions | permission\_type | NULL | NULL |  
| passbolt | user\_agents | id | utf8 | utf8\_unicode\_ci |  
| passbolt | user\_agents | name | utf8 | utf8\_unicode\_ci |  
±-------------±-----------------------------±----------------±-------------------±------------------+  
180 rows in set (0.01 sec)

@remy the output of show tables:

mysql\> show tables;  
±-----------------------------+  
| Tables\_in\_passbolt |  
±-----------------------------+  
| authentication\_tokens |  
| burzum\_file\_storage\_phinxlog |  
| cake\_sessions |  
| comments |  
| controller\_logs |  
| email\_queue |  
| email\_queue\_phinxlog |  
| favorites |  
| file\_storage |  
| gpgkeys |  
| groups |  
| groups\_users |  
| permissions |  
| permissions\_types |  
| phinxlog |  
| profiles |  
| resources |  
| roles |  
| schema\_migrations |  
| secrets |  
| user\_agents |  
| users |  
| users\_resources\_permissions |  
±-----------------------------+  
23 rows in set (0.00 sec)

---

<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:** [May 16, 2018, 10:44am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/25 "2018-05-16T10:44:02Z")

</div>

@jpmdwx I can see several issues:

- You still have all the fields / tables that were dropped during v1 to v2 migration
- You have mixed collations (like latin1\_swedish\_ci, utf8\_unicode\_ci, utf8\_general\_ci) this is known to cause issues when joining tables.
- You do not have anywhere the charset of the v2 ( utf8mb4\_unicode\_ci)

It seems that your database schema is not affected by the migration script, which i’m not sure why.

---

<div class="post-metadata">

**Author:** ![cedric](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/cedric/32/3868_2.png) [@cedric](https://community.passbolt.com/u/cedric)\
**Post date:** [May 16, 2018, 10:53am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/26 "2018-05-16T10:53:28Z")

</div>

Just in case, can you remove the files under tmp/cache/persistent/ and tmp/cache/model your user doesn’t have right on.

---

<div class="post-metadata">

**Author:** ![jpmdwx](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jpmdwx](https://community.passbolt.com/u/jpmdwx)\
**Post date:** [May 16, 2018, 12:24pm UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/27 "2018-05-16T12:24:48Z")

</div>

@cedric I’ve removed the files you says, now migration’s script output is all right.

@remy What can I do then? May be I can force collation/charset on my schema?

Thanks!

---

<div class="post-metadata">

**Author:** ![cedric](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/cedric/32/3868_2.png) [@cedric](https://community.passbolt.com/u/cedric)\
**Post date:** [May 16, 2018, 12:29pm UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/28 "2018-05-16T12:29:28Z")

</div>

Can you execute this mysql command `describe favorites;` so we know if the migrations performed at least the expected columns changes.

---

<div class="post-metadata">

**Author:** ![jpmdwx](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jpmdwx](https://community.passbolt.com/u/jpmdwx)\
**Post date:** [May 16, 2018, 12:30pm UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/29 "2018-05-16T12:30:21Z")

</div>

Here is the output:

mysql\> describe favorites;  
±--------------±------------±-----±----±--------±------+  
| Field | Type | Null | Key | Default | Extra |  
±--------------±------------±-----±----±--------±------+  
| id | varchar(36) | NO | PRI | NULL | |  
| user\_id | varchar(36) | YES | | NULL | |  
| foreign\_id | varchar(36) | NO | | NULL | |  
| foreign\_model | varchar(36) | NO | | NULL | |  
| created | datetime | NO | | NULL | |  
±--------------±------------±-----±----±--------±------+  
5 rows in set (0.00 sec)

---

<div class="post-metadata">

**Author:** ![cedric](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/cedric/32/3868_2.png) [@cedric](https://community.passbolt.com/u/cedric)\
**Post date:** [May 16, 2018, 12:32pm UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/30 "2018-05-16T12:32:44Z")

</div>

Here foreign\_id should be renamed in foreign\_key.  
The db migrations scripts are not run against your passbolt db, I don’t know where else they can be run on

---

<div class="post-metadata">

**Author:** ![cedric](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/cedric/32/3868_2.png) [@cedric](https://community.passbolt.com/u/cedric)\
**Post date:** [May 16, 2018, 12:34pm UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/31 "2018-05-16T12:34:26Z")

</div>

When you’re loading your backup from the v1, is the database empty ?

---

<div class="post-metadata">

**Author:** ![jpmdwx](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@jpmdwx](https://community.passbolt.com/u/jpmdwx)\
**Post date:** [May 17, 2018, 6:32am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/32 "2018-05-17T06:32:15Z")

</div>

I’ve dropped my schema and imported it again from backup. Then, I ran the migration script and now is working fine!!

Thanks a lot for all your help!!!

Best regards

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/b/bee7d3f9329f668000d46e9fcb2e5db1e9d31348.svg) [@system](https://community.passbolt.com/u/system)\
**Post date:** [May 22, 2018, 6:32am UTC](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661/33 "2018-05-22T06:32:18Z")

</div>

Closed on May 22, 2018, 6:32am UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

[Previous page](https://community.passbolt.com/t/error-after-upgrade-from-1-6-10-to-2-0-7/661.md?page=1)
