adds meilisearch

This commit is contained in:
Christian Beutel
2024-02-03 14:26:47 +01:00
parent 905995a01c
commit c370690747
14 changed files with 242 additions and 66 deletions

View File

@@ -0,0 +1,50 @@
/// <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)
})