mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
fix: migration
This commit is contained in:
parent
417f99d94f
commit
1e3c6b4a66
@ -1,8 +0,0 @@
|
||||
package model
|
||||
|
||||
type ApiToken struct {
|
||||
Common
|
||||
UserID uint64 `json:"user_id"`
|
||||
Token string `json:"token"`
|
||||
Note string `json:"note"`
|
||||
}
|
@ -61,10 +61,10 @@ func InitDBFromPath(path string) {
|
||||
if Conf.Debug {
|
||||
DB = DB.Debug()
|
||||
}
|
||||
err = DB.AutoMigrate(model.Server{}, model.User{},
|
||||
model.Notification{}, model.AlertRule{}, model.Service{},
|
||||
model.ServiceHistory{}, model.Cron{}, model.Transfer{},
|
||||
model.ApiToken{}, model.NAT{}, model.DDNSProfile{}, model.NotificationGroupNotification{})
|
||||
err = DB.AutoMigrate(model.Server{}, model.User{}, model.ServerGroup{}, model.NotificationGroup{},
|
||||
model.Notification{}, model.AlertRule{}, model.Service{}, model.NotificationGroupNotification{},
|
||||
model.ServiceHistory{}, model.Cron{}, model.Transfer{}, model.ServerGroupServer{}, model.UserGroup{},
|
||||
model.UserGroupUser{}, model.NAT{}, model.DDNSProfile{}, model.NotificationGroupNotification{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user