Most attachments deleted from server when upgrading to 1.10.0-dev from 1.9.3 #4082

Closed
opened 2025-11-02 05:36:56 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @guillep2k on GitHub (Oct 9, 2019).

I've just upgraded my company server to 1.10.0-dev from 1.9.3 and most attachments from issues were gone from the file-system (they were still there in the attachment table). Lucky me I had a good backup at hand and recovered them all, so no worries there. However, this is something we should definite look into.

I've checked what migration steps new to 1.10 are related to attachments and I've found this step from #6068:

3810fa48ac/models/migrations/v96.go (L16)

I'm not sure about the reasoning of the function, but it seems to me that it deletes all but those related to releases (EDIT: or comments; those deleted were from issues or PR).

Originally created by @guillep2k on GitHub (Oct 9, 2019). I've just upgraded my company server to 1.10.0-dev from 1.9.3 and most attachments from issues were gone from the file-system (they were still there in the `attachment` table). Lucky me I had a good backup at hand and recovered them all, so no worries there. However, this is something we should definite look into. I've checked what migration steps new to 1.10 are related to attachments and I've found this step from #6068: https://github.com/go-gitea/gitea/blob/3810fa48ac46620432fbf91571a01eeea0b460b3/models/migrations/v96.go#L16 I'm not sure about the reasoning of the function, but it seems to me that it deletes all but those related to releases (EDIT: or comments; those deleted were from issues or PR).
GiteaMirror added the type/bug label 2025-11-02 05:36:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4082