Files
beszel-ipv6/internal/migrations/1790193183_network_monitor_cert.go
2026-09-23 17:07:29 -04:00

25 lines
588 B
Go

package migrations
import (
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("network_monitors")
if err != nil {
return err
}
collection.Fields.Add(&core.JSONField{Name: "certInfo"})
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("network_monitors")
if err != nil {
return err
}
collection.Fields.RemoveByName("certInfo")
return app.Save(collection)
})
}