summaryrefslogtreecommitdiffstats
path: root/models/migrations/v96.go
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2019-10-09 06:36:53 -0300
committerLunny Xiao <xiaolunwen@gmail.com>2019-10-09 17:36:53 +0800
commitdd611c9a86f5a192a7a76146613a7e087b09f221 (patch)
treefa01a111cc77db346941d3805d14dc77e8b79ec3 /models/migrations/v96.go
parent3810fa48ac46620432fbf91571a01eeea0b460b3 (diff)
downloadgitea-dd611c9a86f5a192a7a76146613a7e087b09f221.tar.gz
gitea-dd611c9a86f5a192a7a76146613a7e087b09f221.zip
Fix migration v96 to keep issue attachments (#8435)
* Fix migration v96 to keep issue attachments * Fix == operator
Diffstat (limited to 'models/migrations/v96.go')
-rw-r--r--models/migrations/v96.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/migrations/v96.go b/models/migrations/v96.go
index 5c2135ffc6..34f67534c2 100644
--- a/models/migrations/v96.go
+++ b/models/migrations/v96.go
@@ -27,7 +27,7 @@ func deleteOrphanedAttachments(x *xorm.Engine) error {
defer sess.Close()
err := sess.BufferSize(setting.Database.IterateBufferSize).
- Where("`comment_id` = 0 and (`release_id` = 0 or `release_id` not in (select `id` from `release`))").Cols("uuid").
+ Where("`issue_id` = 0 and (`release_id` = 0 or `release_id` not in (select `id` from `release`))").Cols("uuid").
Iterate(new(Attachment),
func(idx int, bean interface{}) error {
attachment := bean.(*Attachment)