From 0fa22301df70d5d5ee460b6cca5349ef7553a05e Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Sat, 19 Jul 2025 01:10:15 +0000 Subject: [PATCH] chore(mothership): make domain name presentable --- .../1752887388_updated_domains.js | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 packages/pockethost/src/mothership-app/pb_migrations/1752887388_updated_domains.js diff --git a/packages/pockethost/src/mothership-app/pb_migrations/1752887388_updated_domains.js b/packages/pockethost/src/mothership-app/pb_migrations/1752887388_updated_domains.js new file mode 100644 index 00000000..2c8af89d --- /dev/null +++ b/packages/pockethost/src/mothership-app/pb_migrations/1752887388_updated_domains.js @@ -0,0 +1,44 @@ +/// +migrate((db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("jw1wz9nmkvnhcm6") + + // update + collection.schema.addField(new SchemaField({ + "system": false, + "id": "wn3oncif", + "name": "domain", + "type": "text", + "required": false, + "presentable": true, + "unique": false, + "options": { + "min": null, + "max": null, + "pattern": "" + } + })) + + return dao.saveCollection(collection) +}, (db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("jw1wz9nmkvnhcm6") + + // update + collection.schema.addField(new SchemaField({ + "system": false, + "id": "wn3oncif", + "name": "domain", + "type": "text", + "required": false, + "presentable": false, + "unique": false, + "options": { + "min": null, + "max": null, + "pattern": "" + } + })) + + return dao.saveCollection(collection) +})