The upgrade is probably the cause of your error. Did you migrate from 4.5 to 5.12 instantly?
Normally it's advised to first upgrade to the 'latest' release of Mendix 4 before upgrading to the 5 version.
I suggest upgrading to 4.8 (I think) first, before migrating to 5.12