Files
lettersoup-online/002_source/pocketbase/pb_migrations/1745340777_updated_Customers.js
2025-04-24 20:03:26 +08:00

30 lines
673 B
JavaScript

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