db safe quoting in migration

https://www.openproject.org/work_packages/14317