-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle charset that are declared per column #1881
Labels
installation
Concerning the installation of OTOBO
Milestone
Comments
TODO:
|
StefanRother-OTOBO
pushed a commit
that referenced
this issue
Nov 12, 2022
bschmalhofer
added a commit
that referenced
this issue
Dec 21, 2022
…at-are-declared-per-column Issue #1881: Updating backup.pl to prevent own column charset and use…
@dennis-dko made the change and tested the adapted SQL output Looks good. PR is merged. Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having the charset utf8 declared on the individual columns is an interesting case.
First, let's sanity check that charset utf8 vs. utf8mb4 is really the problem. The problematic emoji is indeed encoded in four bytes:
So, this theory is confirmed.
I assume that you used the streamlined migration method for migrating the data from OTRS to OTOBO:
https://doc.otobo.org/manual/installation/10.0/en/content/migration-from-otrs-6.html#optional-step-streamlined-migration-of-the-database .
Checking the script scripts/backup.pl, I found that there is an oversight. The charset on the tables is adapted and the COLLATE on columns is removed in the subroutine
MySQLBackupForMigrateFromOTRS()
, see https://github.com/RotherOSS/otobo/blob/rel-10_1/scripts/backup.pl#L578. But theCHARACTER SET utf8
is not removed. This oversight seems to be the root cause of the problem.Now for the fix. The statement
alter table article_data_mime convert to character set utf8mb4 collate utf8mb4_general_ci;
is likely not enough, as the charset set of the columns have higher priority than the default charset of the table. So the relevant statement is more like:My preferred solution would be to redo the migration. Either with a fixed script scripts/backup.pl or with using the standard migration method.
Originally posted by @bschmalhofer in #1879 (comment)
The text was updated successfully, but these errors were encountered: