Migrating a wiki from 1.31.6 to 1.35.0 failed for me with this error from the database log (PostgreSQL):
ERROR: operator does not exist: text = integer at character 1055 HINT: No operator matches the given name and argument types. You might need to add explicit type casts. STATEMENT: SELECT /* MigrateComments::loadCommentIDs sysadmin@wiki-p... */ comment_id,comment_text FROM "comment" WHERE ((comment_hash = 663705717 AND comment_text = '/* TOPs */') OR (comment_hash = -29472803 AND comment_text = '/* Themenspeicher */') ...
The problematic part around character 1055 was
OR (comment_hash = -1801163141 AND comment_text = 2020)
i.e. the value "2020" was not correctly quoted, it should have been
OR (comment_hash = -1801163141 AND comment_text = '2020')
Table "recentchanges" does indeed contain an entry "rc_comment" of just the value "2020".
I assume (without further proof, I don't speak PHP), that some code generating the SQL statement erroneously decides not to quote "2020", because it does not look like a string but a numeral.