diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-12-08 20:27:30 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-12-08 14:27:30 +0200 |
commit | 4b4453cb9226e1a5229b8bdbb91ecfbdfc64d87d (patch) | |
tree | 9bfe2103f80af2cc3937e6f28f9eda6e590df7e3 /models/topic.go | |
parent | 8b864a328ed0875543ef0a6d6541d8f2913165f1 (diff) | |
download | gitea-4b4453cb9226e1a5229b8bdbb91ecfbdfc64d87d.tar.gz gitea-4b4453cb9226e1a5229b8bdbb91ecfbdfc64d87d.zip |
fix topic name length on database (#5493)
Diffstat (limited to 'models/topic.go')
-rw-r--r-- | models/topic.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/topic.go b/models/topic.go index 678795a3db..da1815be76 100644 --- a/models/topic.go +++ b/models/topic.go @@ -26,7 +26,7 @@ var topicPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9-]*$`) // Topic represents a topic of repositories type Topic struct { ID int64 - Name string `xorm:"UNIQUE"` + Name string `xorm:"UNIQUE VARCHAR(25)"` RepoCount int CreatedUnix util.TimeStamp `xorm:"INDEX created"` UpdatedUnix util.TimeStamp `xorm:"INDEX updated"` |