diff --git a/pkg/migration/20210711173657.go b/pkg/migration/20210711173657.go index 83919960..a23f08e0 100644 --- a/pkg/migration/20210711173657.go +++ b/pkg/migration/20210711173657.go @@ -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:"TEXT not null index"` + Token string `xorm:"varchar(450) not null index"` Kind int `xorm:"not null"` Created time.Time `xorm:"created not null"` } diff --git a/pkg/user/token.go b/pkg/user/token.go index 0a999f0e..1af05efe 100644 --- a/pkg/user/token.go +++ b/pkg/user/token.go @@ -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:"TEXT not null index"` + Token string `xorm:"varchar(450) not null index"` Kind TokenKind `xorm:"not null"` Created time.Time `xorm:"created not null"` }