pocketbase_demo/pb_migrations/1771708551_updated_articles.js

38 lines
842 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_4287850865")
// update field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "number130897217",
"max": 15,
"min": -15,
"name": "weight",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_4287850865")
// update field
collection.fields.addAt(4, new Field({
"hidden": false,
"id": "number130897217",
"max": 15,
"min": -15,
"name": "weight",
"onlyInt": true,
"presentable": true,
"required": false,
"system": false,
"type": "number"
}))
return app.save(collection)
})