Save user tokens as text and not varchar

This commit is contained in:
kolaente 2021-07-14 12:43:28 +02:00
parent 7ee535de47
commit 7e229a1b83
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ func (u user20210711173657) TableName() string {
type userTokens20210711173657 struct {
ID int64 `xorm:"bigint autoincr not null unique pk"`
UserID int64 `xorm:"not null"`
Token string `xorm:"not null"`
Token string `xorm:"TEXT not null index"`
Kind int `xorm:"not null"`
Created time.Time `xorm:"created not null"`
}

View file

@ -41,7 +41,7 @@ const (
type Token struct {
ID int64 `xorm:"bigint autoincr not null unique pk"`
UserID int64 `xorm:"not null"`
Token string `xorm:"not null"`
Token string `xorm:"TEXT not null index"`
Kind TokenKind `xorm:"not null"`
Created time.Time `xorm:"created not null"`
}