Matomo 4.0.4 - problem with converting tables to utf8mb4

Hello

We have updated our matomo 3.x installation to new version 4.0.4 - looks like it’s all going well, but update tables to use utf8mb4 have problems.

this is looks like this

Starting the database upgrade process now. This may take a while, so please be patient.

Executing ALTER TABLE `matomo_user` CONVERT TO CHARACTER SET utf8mb4;... ERROR [2020-12-09 08:58:12] 1099  Uncaught exception: /var/www/matomo/libs/Zend/Db/Adapter/Pdo/Abstract.php(280): SQLSTATE[HY000]: General error: 1833 Cannot change column 'login': used in a foreign key constraint 'matomo_loginoidc_provider_ibfk_1' of table 'matomo-db.matomo_loginoidc_provider'
SQLSTATE[HY000]: General error: 1833 Cannot change column 'login': used in a foreign key constraint 'matomo_loginoidc_provider_ibfk_1' of table 'matomo-db.matomo_loginoidc_provider'

 [Zend_Db_Adapter_Exception]
  SQLSTATE[HY000]: General error: 1833 Cannot change column 'login': used in a foreign key constraint 'matomo_loginoidc_provider_ibfk_1' of table 'matomo-db.matomo_loginoidc_provider'

 [PDOException]
  SQLSTATE[HY000]: General error: 1833 Cannot change column 'login': used in a foreign key constraint 'matomo_loginoidc_provider_ibfk_1' of table 'matomo-db.matomo_loginoidc_provider'

Can someone help me ?

Hi,

It seems like this plugin:

https://plugins.matomo.org/LoginOIDC

adds a foreign key constraint to the database that disallows the changes needed for the conversion.

I’d recommend you to report the issue to the author as they might not be aware of it yet:

Hello

Thank you for reply, I’ll let him know.

If anyone run in the same problem, check out this post https://github.com/dominik-th/matomo-plugin-LoginOIDC/issues/35#issuecomment-744496854

that is workaround which will help you.

1 Like