From 4c62df021d695d358c2b3d29e0ccc73f2135bd70 Mon Sep 17 00:00:00 2001 From: Christian Beutel <> Date: Sat, 22 Mar 2025 15:03:34 +0100 Subject: [PATCH] increase max traill description length --- db/migrations/1742649006_updated_trails.go | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 db/migrations/1742649006_updated_trails.go diff --git a/db/migrations/1742649006_updated_trails.go b/db/migrations/1742649006_updated_trails.go new file mode 100644 index 00000000..e6497753 --- /dev/null +++ b/db/migrations/1742649006_updated_trails.go @@ -0,0 +1,60 @@ +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("e864strfxo14pm4") + if err != nil { + return err + } + + // update field + if err := collection.Fields.AddMarshaledJSONAt(2, []byte(`{ + "autogeneratePattern": "", + "hidden": false, + "id": "6kkucam1", + "max": 10000, + "min": 0, + "name": "description", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }`)); err != nil { + return err + } + + return app.Save(collection) + }, func(app core.App) error { + collection, err := app.FindCollectionByNameOrId("e864strfxo14pm4") + if err != nil { + return err + } + + // update field + if err := collection.Fields.AddMarshaledJSONAt(2, []byte(`{ + "autogeneratePattern": "", + "hidden": false, + "id": "6kkucam1", + "max": 0, + "min": 0, + "name": "description", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }`)); err != nil { + return err + } + + return app.Save(collection) + }) +}