wiseflow/pb/pb_migrations/1735270046_updated_infos.js
bigbrother666sh ae7b5d7f65 v0.3.6
2024-12-27 14:07:37 +08:00

30 lines
676 B
JavaScript

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