I used Nextcloud for a few years already and never, ever I had a corrupted DB in any of the upgrades.