diff --git a/packages/pockethost/src/mothership-app/pb_migrations/1736478456_updated_users.js b/packages/pockethost/src/mothership-app/pb_migrations/1736478456_updated_users.js new file mode 100644 index 00000000..4421136d --- /dev/null +++ b/packages/pockethost/src/mothership-app/pb_migrations/1736478456_updated_users.js @@ -0,0 +1,31 @@ +/// +migrate((db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("systemprofiles0") + + // add + collection.schema.addField(new SchemaField({ + "system": false, + "id": "u4ckg6um", + "name": "subscription_quantity", + "type": "number", + "required": false, + "presentable": false, + "unique": false, + "options": { + "min": null, + "max": null, + "noDecimal": false + } + })) + + return dao.saveCollection(collection) +}, (db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("systemprofiles0") + + // remove + collection.schema.removeField("u4ckg6um") + + return dao.saveCollection(collection) +})