Failed upgrade 29 to 31 with db migration to postgres17 on TrueNAS Scale

Hello, I had Nextcloud running for a while on TrueNAS scale. Until then everything was smooth but the last update didn’t go well.
Somehow TrueNAS updated from 29.0.6.1 (as in config.php) to 31.0.0. In between there was a db migration from Postgres 15 to 17, that seams successful. It was also requested to move the user data from data/data to a dedicated userdata folder, which I did.
But I cannot run Nextcloud as the update from 29 to 30 never happened and occ refuse to upgrade 2 major versions.
How could I save the situation?

I gave up and start a fresh new instance, not without pain.