Fix missing repository id when migrating release attachments (#36389) (#36413)

This PR fixes missed repo_id on the migration of attachments to Gitea.
It also provides a doctor check to fix the dirty data on the database.

Backport #36389
This commit is contained in:
Lunny Xiao
2026-01-20 23:36:45 +02:00
committed by GitHub
parent 38125a8d1d
commit 4cdb8a7f96
6 changed files with 74 additions and 17 deletions
+1
View File
@@ -320,6 +320,7 @@ func (g *GiteaLocalUploader) CreateReleases(ctx context.Context, releases ...*ba
}
attach := repo_model.Attachment{
UUID: uuid.New().String(),
RepoID: g.repo.ID,
Name: asset.Name,
DownloadCount: int64(*asset.DownloadCount),
Size: int64(*asset.Size),