Skip to navigation

Database ER (core entities)

View as Markdown

Used in: §9.x reference for backend devs, §14.5 Migrations Audience: Backend Developer, DevOps IA ID: extra (required by user inst.)

USERS PK uuid id UK text email text name text role timestamptz created_at DIDS PK text did FK uuid user_id text method text public_key text status timestamptz created_at timestamptz updated_at text tx_hash SESSIONS PK uuid id FK uuid user_id text refresh_jti timestamptz expires_at AGENTS PK text did FK uuid operator_id int autonomy_level int trust_score text status CREDENTIALS PK uuid id FK text issuer_did FK text subject_did FK uuid schema_id jsonb claims text proof_jwt text status_list_id int status_list_idx timestamptz issued_at ZK_PROOFS PK uuid id FK text prover_did FK uuid credential_id text predicate bytea proof text proof_hash boolean revoked timestamptz created_at SCHEMAS PK uuid id text name text version jsonb json_schema text issuer_did REVOCATIONS PK uuid id FK uuid credential_id text reason timestamptz revoked_at owns has operates subjectOf proverOf agent_did validates may_be

Reading guide: The schema is illustrative — column names match repository code conventions but exact migrations should be confirmed against migrations/*.sql (see open question 4).