Db conversion sqlite -> mariadb 21.0.1

Hi.
I’m new to nextcloud and this platform.

I faced a problem when I tried to change my db from sqlite to maraidb. I have already seen lots of posts about this, but none of theses with a solution and the latest version 21.0.1 that I am using.

I already tried to upgrade to mariadb on version 21.0.0 and faced the same issues. So I gave it a chance on 21.0.1

Now I don’t know what to do.
Command:
sudo -u apache php occ db:convert-type --password somePw --all-apps mysql nextcloud 127.0.0.1 nextcloud

First I had the problem “In QuoteHelper.php line 62:” which I could resolve adding that line in ‘./lib/private/DB/QueryBuilder/QuoteHelper.php’

So I could continue but running into the following error:

In ExceptionConverter.php line 114:

An exception occurred while executing a query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x8E\x82 L…’ for column nextcloud.oc_ calendarobjects_props.value at row 1

In Exception.php line 26:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x8E\x82 L…’ for column nextcloud.oc_calendarobjects_props.value at row 1

In Statement.php line 82:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x8E\x82 L…’ for column nextcloud.oc_calendarobjects_props.value at row 1

Nextcloud version 21.0.1
php 7.4.16
OS Centos 8
apache2

I found this old thread that wasn’t solved:

For that reason, it’s probably the best to create a bug report on Issues · nextcloud/server · GitHub

I already found a lot of posts, but no solution.
That one is still open I guess?

OK so I found the solution… da f*… :smiley:
I’m really happy, because it was a long journey.

  1. So first of all, thanks @tflidd it was the birthday cake inside the automatically created birthday calendar, so I deleted these calendars for all users.

So I continued to the next error, that was
In ExceptionConverter.php line 114:

An exception occurred while executing a query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9F\x91\x8D’ for column nextcloud.oc_comme nts.message at row 1

  1. There was another thumps up emoji inside a “talk” conversation, so I made an UPDATE oc_messages SET message ‘OK’ WHERE id = …

So I got another error:
An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1-56cf81fc8f95690cacc7211433bc9f19’ for key ‘fs_sto
rage_path_hash’
3. This is becuase I had the music app installed, so I disabled temporarily the music app

and that’s it, the conversion finished successfully.
Thanks God.

Hope this helps somebody else with the same problem.