mirror of
https://github.com/TeamWiseFlow/wiseflow.git
synced 2025-02-03 02:54:37 +08:00
28 lines
649 B
JavaScript
28 lines
649 B
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("sma08jpi5rkoxnh")
|
|
|
|
// add
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "8x8n2a47",
|
|
"name": "activated",
|
|
"type": "bool",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("sma08jpi5rkoxnh")
|
|
|
|
// remove
|
|
collection.schema.removeField("8x8n2a47")
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|