Files
wanderer/db/migrations/1760706161_updated_integrations.go
slothful-vassal 369e71fcec hammerhead integration added (#628)
* hammerhead integration added

* typo corrected

* start date added, optimize some translations

* new option to send trail to hammerhead

* fix elevation information (was in cm)

* skip empty tracks on import

* update docs

* remove manual user-id input

* fix merge issues

* remove user-id from documentation

* fix hammerhead logo for light theme

* fix hammerhead logo for light theme

---------

Co-authored-by: Christian Beutel <>
Co-authored-by: Flomp <Flomp@users.noreply.github.com>
2026-03-20 13:58:34 +01:00

42 lines
849 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("iz4sezoehde64wp")
if err != nil {
return err
}
// add field
if err := collection.Fields.AddMarshaledJSONAt(4, []byte(`{
"hidden": false,
"id": "json2528191900",
"maxSize": 2000000,
"name": "hammerhead",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}`)); err != nil {
return err
}
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("iz4sezoehde64wp")
if err != nil {
return err
}
// remove field
collection.Fields.RemoveById("json2528191900")
return app.Save(collection)
})
}