Files
vitrify-me/apps/pocketbase/pb_migrations/1756205515_updated_transactions.js
2025-08-26 16:49:54 +04:00

43 lines
910 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select3241110846",
"maxSelect": 1,
"name": "order_type",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"booking",
"subscription"
]
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_3174063690")
// update field
collection.fields.addAt(1, new Field({
"hidden": false,
"id": "select3241110846",
"maxSelect": 1,
"name": "order_type",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"booking",
"subscription"
]
}))
return app.save(collection)
})