From 557750607616bba9610f23467327b69f4bed27d8 Mon Sep 17 00:00:00 2001 From: june Date: Wed, 13 Aug 2025 11:11:54 +1200 Subject: [PATCH] db changes --- api/pb_migrations/1755039357_updated_steps.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 api/pb_migrations/1755039357_updated_steps.js diff --git a/api/pb_migrations/1755039357_updated_steps.js b/api/pb_migrations/1755039357_updated_steps.js new file mode 100644 index 0000000..33096e5 --- /dev/null +++ b/api/pb_migrations/1755039357_updated_steps.js @@ -0,0 +1,28 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_4284789913") + + // remove field + collection.fields.removeById("relation3666391351") + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_4284789913") + + // add field + collection.fields.addAt(3, new Field({ + "cascadeDelete": false, + "collectionId": "pbc_842702175", + "hidden": false, + "id": "relation3666391351", + "maxSelect": 1, + "minSelect": 0, + "name": "recipe", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + })) + + return app.save(collection) +})