Just a warning to any Mac users. I have upgraded from 5.1.6 to 5.2 on Intel based Mac running Monterey 12.7.3. Used official dmg package. On first run I was asked to allow upgrade of the database which I did. Ended up with an error resulting in empty database. Quite scary initially. Recovered by replacing the “new” database with a copy of 5.1.6 that I wisely took before the upgrade.
I have filed a bug report (#13196) as suggested by the program.
I looked at your report, and if the import of a .gramps backup didn’t work, and a GEDCOM import did, you have data loss now, in your notes. All text styles and links have probably disappeared.
I did a similar upgrade for all databases that I have on my laptop, where I already installed 5.2 to test, in LMDE 6 (Debian based), and these upgrades were all OK too.
This is why I’m sure that the problem is triggered by a specific entry in @PeterO 's database, and why I hope that he can attach a .gramps file to his bug report, so that we can reproduce the error.
Using GEDCOM files as a workaround is not a good idea.