astro_avtourist/backend/pb_migrations/1776200412_updated_posts.js

26 lines
600 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// add field
collection.fields.addAt(6, new Field({
"hidden": false,
"id": "date2862495610",
"max": "",
"min": "",
"name": "date",
"presentable": false,
"required": false,
"system": false,
"type": "date"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_1125843985")
// remove field
collection.fields.removeById("date2862495610")
return app.save(collection)
})