Files
wanderer/db/pb_migrations/1706346152_updated_trails.js
Christian Beutel b302ccded0 initial commit
2024-01-27 20:39:12 +01:00

32 lines
714 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "ukr9rqz4",
"name": "time",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// remove
collection.schema.removeField("ukr9rqz4")
return dao.saveCollection(collection)
})