Draft: tests: add coverage for models migration helpers
PR: https://github.com/go-gitea/gitea/pull/18162 (merged)
They were previously not covered at all, either by integration tests or unit tests.
It fixes a bug where the num_comments field was incorrectly set to include all types of comments.
It also sets
num_closed_issues: 0 as default in milestone fixtures. If they are not set, Incr("num_closed_issues") will be a noop because the field is null.
The would be the case for instance in models/migrate.go
[xorm] [info] 2021/12/30 21:38:05.370805 [SQL] UPDATE
num_issues + ?,