[FIX] Text reference migration for MySQL

Implements [ticket 3068](https://www.openproject.org/work_packages/3068)