新增数据

This commit is contained in:
2025-01-07 13:50:42 +08:00
parent 27c08f735c
commit ab08f7e169
3 changed files with 70 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ func InitGorm() {
func AutoMigrate(db *gorm.DB) {
err := db.AutoMigrate(
new(model.Device),
new(model.DevData),
new(model.DevUpData),
)
if err != nil {
fmt.Println("[-] 迁移数据表失败:", err.Error())