mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -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 {
|
if Conf.Debug {
|
||||||
DB = DB.Debug()
|
DB = DB.Debug()
|
||||||
}
|
}
|
||||||
err = DB.AutoMigrate(model.Server{}, model.User{},
|
err = DB.AutoMigrate(model.Server{}, model.User{}, model.ServerGroup{}, model.NotificationGroup{},
|
||||||
model.Notification{}, model.AlertRule{}, model.Service{},
|
model.Notification{}, model.AlertRule{}, model.Service{}, model.NotificationGroupNotification{},
|
||||||
model.ServiceHistory{}, model.Cron{}, model.Transfer{},
|
model.ServiceHistory{}, model.Cron{}, model.Transfer{}, model.ServerGroupServer{}, model.UserGroup{},
|
||||||
model.ApiToken{}, model.NAT{}, model.DDNSProfile{}, model.NotificationGroupNotification{})
|
model.UserGroupUser{}, model.NAT{}, model.DDNSProfile{}, model.NotificationGroupNotification{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user