gitea version: v1.15.0-rc1 or newer introduced with #15599 reproduce: 1. migrate any repo with issues/pulls 2. try to create a new pull or issue -> `newIssue: Error 1062: Duplicate entry '424-1' for key 'UQE_tmp_recreate__issue_repo_index'`