#66686The data types text and varchar are incompatible in the equal to operator
Description
This query fails with MSSQL:
SELECT COUNT(uid) FROM sys_file WHERE storage = 1 AND identifier = '/_migrated/content_upload/whatever.jpg'
Solution is to use identifier LIKE '/_migrated/...' instead.