adds meilisearch
This commit is contained in:
50
db/pb_migrations/1706962342_updated_trails.js
Normal file
50
db/pb_migrations/1706962342_updated_trails.js
Normal 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)
|
||||
})
|
||||
Reference in New Issue
Block a user