Merge pull request 'fix: extend forgejo_auth_token
table (part two)' (#5984) from earl-warren/forgejo:wip-forgejo-auth-token into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5984 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
356aa6521b
2 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ type AuthorizationToken struct {
|
||||||
UID int64 `xorm:"INDEX"`
|
UID int64 `xorm:"INDEX"`
|
||||||
LookupKey string `xorm:"INDEX UNIQUE"`
|
LookupKey string `xorm:"INDEX UNIQUE"`
|
||||||
HashedValidator string
|
HashedValidator string
|
||||||
Purpose AuthorizationPurpose `xorm:"NOT NULL"`
|
Purpose AuthorizationPurpose `xorm:"NOT NULL DEFAULT 'long_term_authorization'"`
|
||||||
Expiry timeutil.TimeStamp
|
Expiry timeutil.TimeStamp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import "xorm.io/xorm"
|
||||||
func AddPurposeToForgejoAuthToken(x *xorm.Engine) error {
|
func AddPurposeToForgejoAuthToken(x *xorm.Engine) error {
|
||||||
type ForgejoAuthToken struct {
|
type ForgejoAuthToken struct {
|
||||||
ID int64 `xorm:"pk autoincr"`
|
ID int64 `xorm:"pk autoincr"`
|
||||||
Purpose string `xorm:"NOT NULL"`
|
Purpose string `xorm:"NOT NULL DEFAULT 'long_term_authorization'"`
|
||||||
}
|
}
|
||||||
if err := x.Sync(new(ForgejoAuthToken)); err != nil {
|
if err := x.Sync(new(ForgejoAuthToken)); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue