The Pocketbase relational database schema is located at pocketbase/schema.dbml

Updates

This doc page will probably get out of sync.
Check the current schema.dbml file in the repo for the up to date schema.
Last updated on: March 28, 2025

Note that this .dbml file does nothing besides enable a viewable diagram of the schema.
It isn’t used for deploying, that is managed in Pocketbase.


User tables

Tables designed for interaction by members, and the permissions involved.

users

Users is the main authentication table, and holds minimal auth information on all users of the platform. It is treated differently in pocketbase to enable the auth stuff.
Users can have different roles, which are abstracted out to a direct relation with another user role table. The entries in the role table are forced to share the exact ID with the user, to make permissions simpler.

members

The main consumer role table is a member, which receive the health services. This table holds member specific data, as well as relations to all the various things a member can have.

counselor

Members are managed by a counselor. Counselors are permissioned to access info through the member entries they manage. Counselors act like admins for their members.

employers

Unused at the moment, but this is for enterprise clients to manage their members.


Data tables

Various datatypes that can be related to users, usually in a one-to-many relationship.

appointments

Members can have many health appointments for scheduling

addresses

Anytime an address is needed in the app, it is created as an entry in this table.

files

Members can have many file uploads.

reports

Members can have many reports. These can be health statuses, checkups or action plans.

tasks

Members can have many tasks either assigned to them, or to help their counselor perform actions on their behalf. Can be hidden from the member.

coverages

Members can have many insurance coverages, acting as digital insurance cards.