mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-07 10:52:17 +00:00
ac49dbe1a2
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
23 lines
482 B
Go
23 lines
482 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_22
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
"gitea.dev/modules/timeutil"
|
|
)
|
|
|
|
func CreateAuthTokenTable(_ context.Context, x base.EngineMigration) error {
|
|
type AuthToken struct {
|
|
ID string `xorm:"pk"`
|
|
TokenHash string
|
|
UserID int64 `xorm:"INDEX"`
|
|
ExpiresUnix timeutil.TimeStamp `xorm:"INDEX"`
|
|
}
|
|
|
|
return x.Sync(new(AuthToken))
|
|
}
|