fix topic name length on database (#5493)
This commit is contained in:
parent
8b864a328e
commit
4b4453cb92
@ -25,7 +25,7 @@ func reformatAndRemoveIncorrectTopics(x *xorm.Engine) (err error) {
|
|||||||
|
|
||||||
type Topic struct {
|
type Topic struct {
|
||||||
ID int64
|
ID int64
|
||||||
Name string `xorm:"UNIQUE"`
|
Name string `xorm:"UNIQUE VARCHAR(25)"`
|
||||||
RepoCount int
|
RepoCount int
|
||||||
CreatedUnix int64 `xorm:"INDEX created"`
|
CreatedUnix int64 `xorm:"INDEX created"`
|
||||||
UpdatedUnix int64 `xorm:"INDEX updated"`
|
UpdatedUnix int64 `xorm:"INDEX updated"`
|
||||||
|
@ -26,7 +26,7 @@ var topicPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9-]*$`)
|
|||||||
// Topic represents a topic of repositories
|
// Topic represents a topic of repositories
|
||||||
type Topic struct {
|
type Topic struct {
|
||||||
ID int64
|
ID int64
|
||||||
Name string `xorm:"UNIQUE"`
|
Name string `xorm:"UNIQUE VARCHAR(25)"`
|
||||||
RepoCount int
|
RepoCount int
|
||||||
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
|
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
|
||||||
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
|
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
|
||||||
|
Loading…
Reference in New Issue
Block a user