Hello from MCP server
/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3503383967")
// update collection data
unmarshal({
"indexes": [
"CREATE UNIQUE INDEX `idx_Ge3s7XBN1N` ON `costsMaterial` (\n `refId`,\n `org`\n)"
]
}, collection)
// update field
collection.fields.addAt(4, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text565658025",
"max": 0,
"min": 0,
"name": "refId",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3503383967")
// update collection data
unmarshal({
"indexes": [
"CREATE UNIQUE INDEX `idx_Ge3s7XBN1N` ON `costsMaterial` (\n `ref_id`,\n `org`\n)"
]
}, collection)
// update field
collection.fields.addAt(4, new Field({
"autogeneratePattern": "",
"hidden": false,
"id": "text565658025",
"max": 0,
"min": 0,
"name": "ref_id",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}))
return app.save(collection)
})