Explorar o código

Merge pull request #2262 from angus-g/fixes/user-following-migration

Add default for NumFollowing field (fixes #2261)
Unknwon %!s(int64=9) %!d(string=hai) anos
pai
achega
157d868254
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      models/user.go

+ 1 - 1
models/user.go

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