diff --git a/api/pb_migrations/1755045585_updated_steps.js b/api/pb_migrations/1755045585_updated_steps.js new file mode 100644 index 0000000..df7c5b5 --- /dev/null +++ b/api/pb_migrations/1755045585_updated_steps.js @@ -0,0 +1,28 @@ +/// +migrate((app) => { + const collection = app.findCollectionByNameOrId("pbc_4284789913") + + // add field + collection.fields.addAt(3, new Field({ + "cascadeDelete": false, + "collectionId": "pbc_3146854971", + "hidden": false, + "id": "relation1264587087", + "maxSelect": 999, + "minSelect": 0, + "name": "ingredients", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + })) + + return app.save(collection) +}, (app) => { + const collection = app.findCollectionByNameOrId("pbc_4284789913") + + // remove field + collection.fields.removeById("relation1264587087") + + return app.save(collection) +})