mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
26 lines
578 B
JavaScript
26 lines
578 B
JavaScript
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
|
|
|
// add
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "mexrkb5z",
|
|
"name": "maintenance",
|
|
"type": "bool",
|
|
"required": false,
|
|
"unique": false,
|
|
"options": {}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("etae8tuiaxl6xfv")
|
|
|
|
// remove
|
|
collection.schema.removeField("mexrkb5z")
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|