34 lines
1.6 KiB
Markdown
34 lines
1.6 KiB
Markdown
|
|
# 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
|
||
|
|
|