Bläddra i källkod

repo: set default value for `is_unlisted` column (#6305)

ᴜɴᴋɴᴡᴏɴ 4 år sedan
förälder
incheckning
2cb83f13fd
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      internal/db/repo.go

+ 2 - 2
internal/db/repo.go

@@ -173,10 +173,10 @@ type Repository struct {
 	NumOpenMilestones   int `xorm:"-" gorm:"-" json:"-"`
 	NumTags             int `xorm:"-" gorm:"-" json:"-"`
 
-	IsPrivate  bool
+	IsPrivate bool
 	// TODO: When migrate to GORM, make sure to do a loose migration with `HasColumn` and `AddColumn`,
 	// see docs in https://gorm.io/docs/migration.html.
-	IsUnlisted bool
+	IsUnlisted bool `xorm:"NOT NULL DEFAULT false"`
 	IsBare     bool
 
 	IsMirror bool