最后我执行了以下查询:
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ą́', 'a');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ę', 'e');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ż', 'z');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ź', 'z');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ó', 'o');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ś', 's');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ć', 'c');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'Ś', 'S');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'Ź', 'Z');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'Ż', 'Z');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'Ń', 'N');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ń', 'n');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'Ł', 'L');
UPDATE file_managed SET `filename` = REPLACE(`filename`, 'ł', 'l');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'Ł', 'L');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ł', 'l');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ą́', 'a');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ę', 'e');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ż', 'z');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ź', 'z');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ó', 'o');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ś', 's');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ć', 'c');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'Ś', 'S');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'Ż', 'Z');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'Ź', 'Z');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'Ń', 'N');
UPDATE file_managed SET `uri` = REPLACE(`uri`, 'ń', 'n');