fix: try to fix sqlite database migration (#231)

This commit is contained in:
CaIon
2024-05-16 16:10:25 +08:00
parent e3b885b7f3
commit 7003a4ed94
2 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ import (
type Token struct {
Id int `json:"id"`
UserId int `json:"user_id"`
UserId int `json:"user_id" gorm:"index"`
Key string `json:"key" gorm:"type:char(48);uniqueIndex"`
Status int `json:"status" gorm:"default:1"`
Name string `json:"name" gorm:"index" `