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

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.
This commit is contained in:
Lunny Xiao
2026-01-20 10:05:51 -08:00
committed by GitHub
parent 987d82b038
commit f6db180a80
9 changed files with 138 additions and 17 deletions
+1
View File
@@ -318,6 +318,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),