2

I just stumbled upon this problem, which was due to fields in some tables having conflicting collations. Thanks to the answer to that question I solved our immediate problem.

But looking around I see a lot of fields in a lot of tables have differing collations. Should I fix all those too, or does that create a risk for other problems?

If I should "reset" all collations, is there a simple way to do that with all fields in all tables without cv (which we currently don't have)?

1 Answer 1

4

It's not a problem for every field, although if you want emoji support then it matters for a different reason (and you would want utf8mb4_unicode_ci everywhere, except some special-purpose fields which are BINARY, e.g. utf8mb4_bin).

You could try the api explorer System.utf8conversion action, which will try to convert tables to utf8mb4, but note it doesn't have any knowledge of extension's tables. Also if the database is big it might time out doing it through the UI, but you said you don't have cv.

  1. Make a backup.
  2. Go to civicrm/api3
  3. For entity choose system
  4. For action choose utf8conversion.
  5. Leave the defaults.
  6. Click execute.

To do extension's tables you can run it again and for the parameter CSV list of table patterns give it the list of the tables created by the extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.