Files
Elternbeirat/pb/pb_migrations/collections_schema.json
T
TomandClaude Opus 5.5 f1a06956f7 Serve downloadable PDFs from a PocketBase documents collection
- New collection "documents" (title, slug, file, category, order, public);
  editors upload PDFs in the admin, no developer or redeploy needed
- The app serves each file at /dokumente/<slug>.pdf, a URL that survives a
  new upload (PocketBase's own file name gets a random suffix)
- New "documents" embed lists them as file cards, grouped by category;
  /downloads uses it
- List/view rules are "public = true", so a draft PDF is not reachable through
  the PocketBase API either
- Dev seed adds example documents with generated PDFs and fixes the
  const reassignment that broke seeding a fresh volume
- Docs: editor guide, architecture, and the manual production setup steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:15:18 +02:00

658 lines
15 KiB
JSON

{
"posts": {
"id": "pbc_1125843985",
"listRule": "",
"viewRule": "",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "posts",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "date2862495610",
"max": "",
"min": "",
"name": "date",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text3685223346",
"max": 0,
"min": 0,
"name": "body",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 0,
"name": "slug",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}
],
"indexes": [],
"created": "2026-09-23 10:38:12.035Z",
"updated": "2026-09-23 11:25:30.698Z",
"system": false
},
"events": {
"id": "pbc_1687431684",
"listRule": "",
"viewRule": "",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "events",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "date2675529103",
"max": "",
"min": "",
"name": "start",
"presentable": false,
"required": true,
"system": false,
"type": "date"
},
{
"help": "",
"hidden": false,
"id": "date16528305",
"max": "",
"min": "",
"name": "end",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text1587448267",
"max": 0,
"min": 0,
"name": "location",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text3485334036",
"max": 0,
"min": 0,
"name": "note",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}
],
"indexes": [],
"created": "2026-09-23 10:38:12.110Z",
"updated": "2026-09-23 10:38:12.110Z",
"system": false
},
"pages": {
"id": "pbc_3945946014",
"listRule": "",
"viewRule": "",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "pages",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text3685223346",
"max": 0,
"min": 0,
"name": "body",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "select1587448267",
"maxSelect": 1,
"name": "location",
"presentable": false,
"required": true,
"system": false,
"type": "select",
"values": [
"header",
"footer"
]
},
{
"help": "",
"hidden": false,
"id": "number4113142680",
"max": null,
"min": null,
"name": "order",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 0,
"name": "slug",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "select1203373331",
"maxSelect": 3,
"name": "embed",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"posts",
"events",
"documents"
]
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}
],
"indexes": [],
"created": "2026-09-23 11:25:35.648Z",
"updated": "2026-09-23 11:25:35.648Z",
"system": false
},
"faq_topics": {
"id": "pbc_529028860",
"listRule": "",
"viewRule": "",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "faq_topics",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 0,
"name": "slug",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text436585760",
"max": 0,
"min": 0,
"name": "intro",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "number4113142680",
"max": null,
"min": null,
"name": "order",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}
],
"indexes": [
"CREATE UNIQUE INDEX `idx_faq_topics_slug` ON `faq_topics` (`slug`)"
],
"created": "2026-09-23 11:59:13.899Z",
"updated": "2026-09-23 11:59:13.899Z",
"system": false
},
"faqs": {
"id": "pbc_2923026773",
"listRule": "",
"viewRule": "",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "faqs",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text3069659470",
"max": 0,
"min": 0,
"name": "question",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text3671935525",
"max": 0,
"min": 0,
"name": "answer",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
},
{
"cascadeDelete": false,
"collectionId": "pbc_529028860",
"help": "",
"hidden": false,
"id": "relation3340346911",
"maxSelect": 1,
"minSelect": 0,
"name": "topic",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"help": "",
"hidden": false,
"id": "number4113142680",
"max": null,
"min": null,
"name": "order",
"onlyInt": true,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}
],
"indexes": [],
"created": "2026-09-23 11:59:13.899Z",
"updated": "2026-09-23 11:59:13.899Z",
"system": false
},
"documents": {
"id": "pbc_2729472648",
"listRule": "public = true",
"viewRule": "public = true",
"createRule": null,
"updateRule": null,
"deleteRule": null,
"name": "documents",
"type": "base",
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"help": "",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text724990059",
"max": 0,
"min": 0,
"name": "title",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text2560465762",
"max": 0,
"min": 0,
"name": "slug",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
"presentable": false,
"primaryKey": false,
"required": true,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "file2359244304",
"maxSelect": 1,
"maxSize": 20971520,
"mimeTypes": [
"application/pdf"
],
"name": "file",
"presentable": false,
"protected": false,
"required": true,
"system": false,
"thumbs": [],
"type": "file"
},
{
"autogeneratePattern": "",
"help": "",
"hidden": false,
"id": "text105650625",
"max": 0,
"min": 0,
"name": "category",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
},
{
"help": "",
"hidden": false,
"id": "number4113142680",
"max": null,
"min": null,
"name": "order",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"help": "",
"hidden": false,
"id": "bool1001664029",
"name": "public",
"presentable": false,
"required": false,
"system": false,
"type": "bool"
}
],
"indexes": [
"CREATE UNIQUE INDEX `idx_documents_slug` ON `documents` (`slug`)"
],
"created": "2026-10-12 10:00:00.000Z",
"updated": "2026-10-12 10:00:00.000Z",
"system": false
}
}