I’m trying to perform a case-insensitive search on a model in Django. I get a case-sensitive search instead. According to the Django docs, utf8_general_ci collation will result in a case-insensitive search. My current collation is utf8mb4_unicode_520_ci.
I tried:
SELECT dbasename ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 collate utf8_general_ci;
but that gave me:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE website_card CONVERT TO CHARACTER SET utf8mb4 collate utf8_general_c' at line 2
I don’t understand what I’m doing wrong. Please advise.