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) }) }