Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease the num_stars when deleting a repo #11954

Merged
merged 24 commits into from
Jul 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint
a1012112796 committed Jun 19, 2020

Verified

This commit was signed with the committer’s verified signature.
commit 8eaa0a6730809f9249452c0faa1cf580e5f50fb7
2 changes: 0 additions & 2 deletions models/migrations/v143.go
Original file line number Diff line number Diff line change
@@ -27,8 +27,6 @@ func recalculateStars(x *xorm.Engine) (err error) {
break
}

var number int64

for _, uid := range userIDs {
if _, err = x.Exec("UPDATE `user` SET num_stars=(SELECT COUNT(*) FROM `star` WHERE uid=?) WHERE id=?", uid, uid); err != nil {
return err