Files
wanderer/db/pb_migrations/1706962342_updated_trails.js
Christian Beutel c370690747 adds meilisearch
2024-02-03 14:26:47 +01:00

51 lines
1.0 KiB
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": "eqeqja1s",
"name": "lat",
"type": "number",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"noDecimal": false
}
}))
// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "y6dbfyw6",
"name": "lon",
"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("eqeqja1s")
// remove
collection.schema.removeField("y6dbfyw6")
return dao.saveCollection(collection)
})