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

45 lines
952 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "wquvuytd",
"name": "name",
"type": "text",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("e864strfxo14pm4")
// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "wquvuytd",
"name": "name",
"type": "text",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": null,
"max": null,
"pattern": ""
}
}))
return dao.saveCollection(collection)
})