Review collation of string columns
I've learned that string columns in MySQL/MariaDB are case-insensitive per default while they are case-sensitive in SQLite. We should check all cases where we rely on the DB to compare strings (including unique constraints). Maybe we need another migration to recreate/alter all affected tables with with correct/consistent collation settings.
Generally I don't think we should rely on DB case folding support in any case. MySQL/MariaDB and SQLite behave very differently. Then there is also the question of unicode normalization.