musclecat/pb_migrations/1704322700_updated_tasks.js

42 lines
929 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("pf13z4hs1iubw41")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "qjz9b0tm",
"name": "schedule",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("pf13z4hs1iubw41")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "qjz9b0tm",
"name": "index4groupdefaultschedule",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
}))
return dao.saveCollection(collection)
})