From f91d1cf00119f16595e3d8484007a80ef2287e50 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Sat, 18 Oct 2025 23:38:34 +0000 Subject: [PATCH] enh(pockethost): add instance notes field --- .../1760356366_updated_instances.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 packages/pockethost/src/mothership-app/pb_migrations/1760356366_updated_instances.js diff --git a/packages/pockethost/src/mothership-app/pb_migrations/1760356366_updated_instances.js b/packages/pockethost/src/mothership-app/pb_migrations/1760356366_updated_instances.js new file mode 100644 index 00000000..3f5a6414 --- /dev/null +++ b/packages/pockethost/src/mothership-app/pb_migrations/1760356366_updated_instances.js @@ -0,0 +1,31 @@ +/// +migrate((db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv") + + // add + collection.schema.addField(new SchemaField({ + "system": false, + "id": "9kcgvnac", + "name": "notes", + "type": "text", + "required": false, + "presentable": false, + "unique": false, + "options": { + "min": null, + "max": null, + "pattern": "" + } + })) + + return dao.saveCollection(collection) +}, (db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv") + + // remove + collection.schema.removeField("9kcgvnac") + + return dao.saveCollection(collection) +})