Browse Source

Fix migration v96 to keep issue attachments (#8435)

* Fix migration v96 to keep issue attachments

* Fix == operator
tags/v1.11.0-dev
guillep2k Lunny Xiao 5 years ago
parent
commit
9100d2cf3c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/migrations/v96.go

+ 1
- 1
models/migrations/v96.go View File

@@ -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)


Loading…
Cancel
Save