...
Code Block |
---|
|
-- find columns with non-standard collations
SELECT
table_name,
column_name,
character_set_name,
collation_name
FROM information_schema.columns c
WHERE table_schema = 'superticker_dev'
and collation_name is not null and collation_name != 'utf8mb4_unicode_ci'; |
...
There can be use cases where the collation is changed for a client to support sorting and searching with their language specifics. This was done for a client in Denmark to improve the sorting in the Election Results.
Code Block |
---|
|
ALTER TABLE elc_event CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ;
ALTER TABLE elc_office CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ;
ALTER TABLE elc_party CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ;
ALTER TABLE elc_candidate CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ;
ALTER TABLE elc_area CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ;
ALTER TABLE story_topic CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ;
ALTER TABLE story_playlist CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci ; |