Skip to content

Commit

Permalink
Fix migration v96 to keep issue attachments (#8435)
Browse files Browse the repository at this point in the history
* Fix migration v96 to keep issue attachments

* Fix == operator
  • Loading branch information
guillep2k authored and lunny committed Oct 9, 2019
1 parent 3810fa4 commit dd611c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/migrations/v96.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dd611c9

Please sign in to comment.