models/db.go
@@ -20,7 +20,15 @@ logger.Debug("db open error ", err) return err } _ = db.AutoMigrate(&Device{}, &Positions{}, &Cache{}) _ = db.AutoMigrate( &Ape{}, &Cache{}, &Cascade{}, &Device{}, &Positions{}, &SubPlatform{}, &Subscribe{}, ) // 添加默认数据 InitData()