What still needs to be clarified:
When updating to Matomo 4, or installing it newly then, it can still be the case that
utf8 charset will be used, if
utf8mb4 is not available. If that is the case, the update to
utf8mb will be actually never tried again. Wondering if we should maybe try to do the conversion for every update automatically if
utf8mb4 is not yet configured.
Using the database charset config to determine if the tables actually use utf8mb4 might not be very save. Someone could maybe change the charset even though the update wasn't performed. Not sure if we should handle that case and maybe store the used charset in the option table instead or maybe simply ignore that case, as it likely shouldn't happen often. Also saving the config in the update process might fail or not work on multi server env 🤔