I had the same problem with the downgrade on the database. This is how I solved it.
1. make a backup of the file in your appdata/gitea/gitea.db
2. copy the file appdata/gitea/gitea.db to your local computer
3. download a sqlite application that can view and edit. I used "DB Browser for SQLite"
4. open the local file gitea.db and look for where you can execute the command UPDATE version SET version=158 WHERE id=1;
5. save the changes
6. copy the file back to appdata/gitea/gitea.db
7. restart the docker container
This worked for me. Just make sure you have a backup just in case.