Files
flxn-app/pb_migrations/1755375248_updated_tournaments.js
2025-08-20 22:35:40 -05:00

46 lines
1009 B
JavaScript

/// <reference path="../pb_data/types.d.ts" />
migrate((app) => {
const collection = app.findCollectionByNameOrId("pbc_340646327")
// remove field
collection.fields.removeById("url156371623")
// add field
collection.fields.addAt(5, new Field({
"hidden": false,
"id": "file3834550803",
"maxSelect": 1,
"maxSize": 0,
"mimeTypes": [],
"name": "logo",
"presentable": false,
"protected": false,
"required": false,
"system": false,
"thumbs": [],
"type": "file"
}))
return app.save(collection)
}, (app) => {
const collection = app.findCollectionByNameOrId("pbc_340646327")
// add field
collection.fields.addAt(5, new Field({
"exceptDomains": null,
"hidden": false,
"id": "url156371623",
"name": "logo_url",
"onlyDomains": null,
"presentable": false,
"required": false,
"system": false,
"type": "url"
}))
// remove field
collection.fields.removeById("file3834550803")
return app.save(collection)
})