diff --git a/src/mothership-app/migrations/1700847183_updated_instances.js b/src/mothership-app/migrations/1700847183_updated_instances.js new file mode 100644 index 00000000..59a54f38 --- /dev/null +++ b/src/mothership-app/migrations/1700847183_updated_instances.js @@ -0,0 +1,44 @@ +/// +migrate((db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv") + + // update + collection.schema.addField(new SchemaField({ + "system": false, + "id": "qdtuuld1", + "name": "subdomain", + "type": "text", + "required": true, + "presentable": false, + "unique": false, + "options": { + "min": null, + "max": 50, + "pattern": "^[a-z][a-z0-9-]{2,39}$" + } + })) + + return dao.saveCollection(collection) +}, (db) => { + const dao = new Dao(db) + const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv") + + // update + collection.schema.addField(new SchemaField({ + "system": false, + "id": "qdtuuld1", + "name": "subdomain", + "type": "text", + "required": true, + "presentable": false, + "unique": false, + "options": { + "min": null, + "max": 50, + "pattern": "^[a-z][\\-a-z]+$" + } + })) + + return dao.saveCollection(collection) +})