astro_avtourist/backend/pb_migrations/1778154554_updated_posts.js

46 lines
996 B
JavaScript
Raw Normal View History

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// add field
collection.fields.addAt(13, new Field({
"help": "",
"hidden": false,
"id": "number1269103533",
"max": null,
"min": null,
"name": "today_views",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}))
// add field
collection.fields.addAt(14, new Field({
"help": "",
"hidden": false,
"id": "date852920662",
"max": "",
"min": "",
"name": "last_reset",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// remove field
collection.fields.removeById("number1269103533")
// remove field
collection.fields.removeById("date852920662")
return app.save(collection)
})