Browse Source

Add default for NumFollowing field (fixes #2261)

We set the default value for the non-NULL field NumFollowing of the User
model to 0, which stops an error when the ORM tries to sync.
tags/v1.2.0-rc1
Angus Gibson 10 years ago
parent
commit
1cfbf02804
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/user.go

+ 1
- 1
models/user.go View File

@@ -91,7 +91,7 @@ type User struct {

// Counters
NumFollowers int
NumFollowing int `xorm:"NOT NULL"`
NumFollowing int `xorm:"NOT NULL DEFAULT 0"`
NumStars int
NumRepos int



Loading…
Cancel
Save