2fec2108ca
- Home: hide duplicate create/join buttons when user has no groups - Invite links: /join/group/:id and /join/team/:id pages for one-click joining - Admin: group admins field, ownership transfer, member management toggle - Events: new events collection with RSVP (going/interested/maybe) and comments Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("es63bkyiblpnxdf")
|
|
|
|
// add admins field
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "sf_admins",
|
|
"name": "admins",
|
|
"type": "relation",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"collectionId": "_pb_users_auth_",
|
|
"cascadeDelete": false,
|
|
"minSelect": null,
|
|
"maxSelect": null,
|
|
"displayFields": null
|
|
}
|
|
}))
|
|
|
|
// add allowMemberManage field
|
|
collection.schema.addField(new SchemaField({
|
|
"system": false,
|
|
"id": "sf_allowmm",
|
|
"name": "allowMemberManage",
|
|
"type": "bool",
|
|
"required": false,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {}
|
|
}))
|
|
|
|
return dao.saveCollection(collection)
|
|
}, (db) => {
|
|
const dao = new Dao(db)
|
|
const collection = dao.findCollectionByNameOrId("es63bkyiblpnxdf")
|
|
|
|
collection.schema.removeField("sf_admins")
|
|
collection.schema.removeField("sf_allowmm")
|
|
|
|
return dao.saveCollection(collection)
|
|
})
|