feat: Add option to define which DNS server a DNS monitor queries (#2389)

This commit is contained in:
Sven van Ginkel
2026-09-25 01:01:10 +02:00
committed by GitHub
parent a20a7d2edc
commit f7528a0208
10 changed files with 220 additions and 20 deletions

View File

@@ -0,0 +1,24 @@
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.TextField{Id: "nm_server", Name: "server", Max: 260})
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("network_monitors")
if err != nil {
return err
}
collection.Fields.RemoveByName("server")
return app.Save(collection)
})
}