Migrating from 0.11.6

I have been trying to migrate a fairly big gogs to gitea for a few days and now I’m stuck.
During the migration it crashes during this step:

2022/01/07 03:03:30 [I] Migration: set protect branches updated with created
2022/01/07 03:03:30 [I] Migration: add external login user
2022/01/07 03:03:31 [I] Migration: generate and migrate Git hooks
2022/01/07 03:03:31 [I] Migration: use new avatar path name for security reason
2022/01/07 03:03:31 [W] ignore avatar b6a6070d564d300fbf068809b59e1264 rename: strconv.ParseInt: parsing "b6a6070d564d300fbf068809b59e1264": invalid syntax
2022/01/07 03:03:31 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Avatar user is not exist

This happens in all versions I’ve tried, in this case was 1.6.4.
Most users in the database are tied to LDAP it that helps.

What’s the current Gitea version are you upgraded to?

I have tried the latest minor version of every major up to 1.6.x and also 1.10.x too, the same error comes up.
Would it help if I tried more recent versions?

No, you have to upgrade from lower version. 1.6.x → 1.7.x → 1.8.x.

The Migration: use new avatar path name for security reason is not belong to v1.16.x. So I think you are not in v1.6.x when occupied the error.

I’m 100% sure I’m running an 1.6.4 binary. If going lower on versions doesn’t help, maybe doing something like wiping the avatars from DB and filesystem would do? I don’t know what else to try.

EDIT: Sorry, I updated gogs to 0.12.3 (the latest) before trying to migrate.

Well, I wiped the avatar both in the data folder and database, now I get this:

2022/01/10 17:17:50 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: Error 1062: Duplicate entry '1389-entrega-iteracao10-v2' for key 'UQE_release_n'

So could you check the database for all the releases of repos_id = 1389 ?

I re-imported the DB and repository data and deleted the problematic repositories from gitea. The migration went on without issues.

Also, deleting the avatars from the database was unnecessary, just removing them from disk did it.

As a last question, is there any way to regenerate avatars for all users?

If user have no customize avatar, system will generate one for him when first visit.