aboutsummaryrefslogtreecommitdiff
path: root/internal/db
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-09-04 05:56:31 +0800
committerGitHub <noreply@github.com>2020-09-04 05:56:31 +0800
commit2cb83f13fd86f99a2c7a9d42461b58fb0a47cf44 (patch)
tree959efcf2c1ca3cba6ab154d7ac3c97925a06f800 /internal/db
parent2665b5968c4d40cf500c3e364ef2f7eece8bd29d (diff)
repo: set default value for `is_unlisted` column (#6305)
Diffstat (limited to 'internal/db')
-rw-r--r--internal/db/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/repo.go b/internal/db/repo.go
index 6d1cb3d9..2a887c7f 100644
--- a/internal/db/repo.go
+++ b/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