Files
Web_BAI_Manage_ApiServer/openspec/specs/pocketbase-schema-docs/spec.md
XuJiacheng e9fe1165e3 feat: 规范化PocketBase数据库文档与原生API访问
- 将数据库文档拆分为按collection命名的标准文件,统一格式
- 补充tbl_company、tbl_system_dict等表的原生访问规则
- 新增users_tag、document_create等字段
- 优化用户资料更新接口,支持非必填字段
- 添加公司原生API测试脚本
- 归档本次变更至OpenSpec
2026-03-29 16:21:34 +08:00

1.6 KiB

pocketbase-schema-docs Specification

Purpose

TBD - created by archiving change normalize-pocketbase-schema-docs. Update Purpose after archive.

Requirements

Requirement: Database structure docs SHALL be maintained per PocketBase collection

The project SHALL document PocketBase schema structures in per-collection markdown files under docs/, and each file SHALL use the collection name in the filename.

Scenario: Collection doc is named by collection

  • WHEN a PocketBase collection has a dedicated schema document
  • THEN the document filename SHALL follow the pb_tbl_xxx.md naming convention

Scenario: Mixed schema docs are replaced

  • WHEN older documents combine multiple unrelated collection structures in one file
  • THEN the project SHALL replace them with per-collection docs to avoid conflicting schema descriptions

Requirement: Database structure docs SHALL use a uniform format

Each PocketBase schema document SHALL use the same section structure so readers can quickly compare tables and verify field and index changes.

Scenario: Reader opens a schema document

  • WHEN a reader opens any database structure document under docs/
  • THEN the document SHALL include source, collection type, access rule summary, purpose, field table, index table, and supplementary notes

Scenario: Schema docs reflect live collection state

  • WHEN the project documents a collection structure
  • THEN the field list and rule summary SHALL be aligned with the current live PocketBase collection state whenever practical