mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-10-27 05:29:03 +08:00
29 lines
692 B
JavaScript
29 lines
692 B
JavaScript
|
|
/// <reference path="../pb_data/types.d.ts" />
|
||
|
|
migrate((app) => {
|
||
|
|
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
||
|
|
|
||
|
|
// add field
|
||
|
|
collection.fields.addAt(5, new Field({
|
||
|
|
"cascadeDelete": true,
|
||
|
|
"collectionId": "_pb_users_auth_",
|
||
|
|
"hidden": false,
|
||
|
|
"id": "relation1319357245",
|
||
|
|
"maxSelect": 1,
|
||
|
|
"minSelect": 0,
|
||
|
|
"name": "approved_by",
|
||
|
|
"presentable": true,
|
||
|
|
"required": false,
|
||
|
|
"system": false,
|
||
|
|
"type": "relation"
|
||
|
|
}))
|
||
|
|
|
||
|
|
return app.save(collection)
|
||
|
|
}, (app) => {
|
||
|
|
const collection = app.findCollectionByNameOrId("pbc_632646243")
|
||
|
|
|
||
|
|
// remove field
|
||
|
|
collection.fields.removeById("relation1319357245")
|
||
|
|
|
||
|
|
return app.save(collection)
|
||
|
|
})
|