feat: 系统升级支持数据库自动迁移,避免手动执行升级脚本

This commit is contained in:
meilin.huang
2025-02-13 21:11:23 +08:00
parent efb2b7368c
commit aa393590b2
78 changed files with 1965 additions and 1827 deletions

View File

@@ -8,11 +8,11 @@ import (
type Oauth2Account struct {
model.DeletedModel
AccountId uint64 `json:"accountId" gorm:"column:account_id;index:account_id,unique"`
Identity string `json:"identity" gorm:"column:identity;index:identity,unique"`
AccountId uint64 `json:"accountId" gorm:"not null;column:account_id;index:account_id,unique;comment:账号ID"`
Identity string `json:"identity" gorm:"size:64;column:identity;index:idx_identity,unique;comment:身份标识"`
CreateTime *time.Time `json:"createTime"`
UpdateTime *time.Time `json:"updateTime"`
CreateTime *time.Time `json:"createTime" gorm:"not null;"`
UpdateTime *time.Time `json:"updateTime" gorm:"not null;"`
}
func (Oauth2Account) TableName() string {