silvester-23/pb_migrations/1699803436_updated_invites.js

28 lines
655 B
JavaScript
Raw Normal View History

2023-11-12 17:33:15 +01:00
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("zfbbb4gbdk9dh6k")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ab1nrrnj",
"name": "portrait_public",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("zfbbb4gbdk9dh6k")
// remove
collection.schema.removeField("ab1nrrnj")
return dao.saveCollection(collection)
})