It’s quite similar to what my file was like (except it was dumped from postgres), isn’t it lunny?
I have no clue about the reason of the problem, but I would bet that there’s a new (mandatory) column in the > 1.7 that wasn’t there in the 1.6 (just a wild guess).
To me, the problem seems more like a variable type conversion failing.
And my guess would be on the config field. You can see at the beginning of my dump that empty variables are stored as {}, and at the end of the dump, they are stored ad NULL.
I would also guess that {} values were stored using gitea version<1.6, as I started using gitea several years ago, and that NULL values are stored using gitea version==1.6.
But all that are only guesses.