c5d3ac01ca
- Group polls with option/rollcall modes, edit by creator, auto-settle - Multimedia memories with upload, preview, inline video playback - In-app notifications for poll/team/group events - Points system and group stats dashboard - Group detail tabs with icons (activity/polls/memories/stats) - Fix: nginx file upload size, static cache blocking API, timezone, auto-cancel Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
72 lines
1.8 KiB
JavaScript
72 lines
1.8 KiB
JavaScript
/// <reference path="../pb_data/types.d.ts" />
|
|
migrate((db) => {
|
|
const collection = new Collection({
|
|
"id": "poll_options_collection",
|
|
"created": "2026-04-18 00:00:02.000Z",
|
|
"updated": "2026-04-18 00:00:02.000Z",
|
|
"name": "poll_options",
|
|
"type": "base",
|
|
"system": false,
|
|
"schema": [
|
|
{
|
|
"system": false,
|
|
"id": "sf_poll",
|
|
"name": "poll",
|
|
"type": "relation",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"collectionId": "polls_collection",
|
|
"cascadeDelete": true,
|
|
"minSelect": null,
|
|
"maxSelect": 1,
|
|
"displayFields": null
|
|
}
|
|
},
|
|
{
|
|
"system": false,
|
|
"id": "sf_content",
|
|
"name": "content",
|
|
"type": "text",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"min": null,
|
|
"max": 200,
|
|
"pattern": ""
|
|
}
|
|
},
|
|
{
|
|
"system": false,
|
|
"id": "sf_order",
|
|
"name": "order",
|
|
"type": "number",
|
|
"required": true,
|
|
"presentable": false,
|
|
"unique": false,
|
|
"options": {
|
|
"min": 0,
|
|
"max": null,
|
|
"noDecimal": true
|
|
}
|
|
}
|
|
],
|
|
"indexes": [],
|
|
"listRule": "@request.auth.id != \"\"",
|
|
"viewRule": "@request.auth.id != \"\"",
|
|
"createRule": "@request.auth.id != \"\"",
|
|
"updateRule": "poll.creator = @request.auth.id",
|
|
"deleteRule": "poll.creator = @request.auth.id",
|
|
"options": {}
|
|
});
|
|
|
|
return Dao(db).saveCollection(collection);
|
|
}, (db) => {
|
|
const dao = new Dao(db);
|
|
const collection = dao.findCollectionByNameOrId("poll_options_collection");
|
|
|
|
return dao.deleteCollection(collection);
|
|
})
|