CRO PlatformAI-Native CRO OS
Toggle navigationMenu

Reference

Database schema — `cro.*` ERD

The canonical data model. Tables are color-coded by category: regulated tables carry provenance and require a Part 11 signature to promote staging → live. Click any table in the diagram to jump to its details card below, or open `/schema?table=study` to deep link.

Tables

15

Columns

174

Foreign keys

20

Regulated tables

9

Regulated9

Carries created_at / updated_at / created_by / provenance_id. Promotion requires a Part 11 signature.

Staging2

Where agents land their writes. State machine: proposed → reviewing → signed → promoted.

Audit2

Append-only provenance and ops logs. Not part of the regulated write path.

Reference2

External or read-only data we index but do not own.

Entity-relationship diagram of the `cro.*` schema — click a table for detailscroprovenance_eventAuditPKiduuid○study_iduuid·actor_kindtext·actor_idtext○model_providertext○model_idtextFKmodel_version_iduuid·actiontext·subject_kindtext·subject_idtext·retrieved_contextjsonb○reviewer_user_iduuid○signature_iduuid·occurred_attimestamptz·payloadjsonbcrostaging_recordStagingPKiduuid·entity_kindtext○entity_iduuid·agent_idtextFKmodel_version_iduuidFKprovenance_iduuid·stateenum·proposed_statejsonb·created_attimestamptz·updated_attimestamptz·created_byuuidcrosignature_eventRegulatedPKiduuid·user_iduuid·user_display_nametext·intentenum·subject_kindtext·subject_idtext·re_auth_attimestamptz·meaning_of_signaturetext·signed_attimestamptz·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcromodel_registry_versionRegulatedPKiduuid·providertext·model_idtext·prompt_hashtext·prompt_versiontext·registered_attimestamptz○retired_attimestamptz·notestext·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrovalidation_evidence_runRegulatedPKiduuid○pr_numberinteger·commit_shatext·evidence_pathsjsonb○signed_by_user_idtext○signed_attimestamptz·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrolive_essential_documentRegulatedPKiduuidFKpromoted_from_staging_iduuidFKsignature_iduuid○study_iduuid·document_typetext·document_titletext·storage_uritext·metadatajsonb·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcroapp_logAuditPKiduuid·leveltext·componenttext·messagetextFKprovenance_iduuid·payloadjsonb·logged_attimestamptzcrostudyRegulatedPKiduuid·codetext·sponsortext·phasetext·therapeutic_areatext·indicationtext·statustext·healthtext·executive_summarytext·goalsjsonb·start_datedate·planned_end_datedate·current_forecast_end_datedate·contracted_budgetnumeric·ebv_spentnumeric·eac_budgetnumeric·currencytext·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrostudy_kpiRegulatedPKiduuidFKstudy_iduuid○labeltext○valuetext○deltatext○delta_directiontext○thresholdtext·positioninteger·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrostudy_milestoneRegulatedPKiduuidFKstudy_iduuid○nametext○planned_datedate○actual_or_forecast_datedate○statustext○positioninteger·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrostudy_riskRegulatedPKiduuidFKstudy_iduuid○titletext○ownertext○severitytext○mitigationtext○statustext·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrostudy_resourceRegulatedPKiduuidFKstudy_iduuid○roletext○headcountinteger○ftenumeric○rate_per_monthnumeric·created_attimestamptz·updated_attimestamptz·created_byuuidFKprovenance_iduuidcrovector_documentReferencePKiduuid·source_kindtext·source_uritext·chunk_indexinteger·contenttext·embeddingjsonb·metadatajsonb·created_attimestamptz·updated_attimestamptzcrosponsor_requestStagingPKiduuid·sponsor_idtext○study_iduuid·subjecttext·bodytext·prioritytext·statustextFKprovenance_iduuid·created_attimestamptz·updated_attimestamptz·created_byuuidauthusersReferencePKiduuid○emailtext○encrypted_passwordtext○email_confirmed_attimestamptz○raw_app_meta_datajsonb○raw_user_meta_datajsonb○last_sign_in_attimestamptz·created_attimestamptz·updated_attimestamptz
LegendRegulatedStagingAuditReferencePKprimary keyFKforeign key

Table reference

2 of 15 tables shown (Audit only)

cro

provenance_event

Append-only ALCOA+ provenance spine. Every regulated action emits a row here before any write. Inspectors join through subject_kind/subject_id to reconstruct chain of custody.

Audit
ColumnTypeKeyReferencesNotes
iduuidPK—
study_iduuidnullable—
actor_kindtextrequired—human | agent | system
actor_idtextrequired—
model_providertextnullable—
model_idtextnullable—
model_version_iduuidFK→ cro.model_registry_version
actiontextrequired—
subject_kindtextrequired—
subject_idtextrequired—
retrieved_contextjsonbrequired—
reviewer_user_iduuidnullable—
signature_iduuidnullable—
occurred_attimestamptzrequired—
payloadjsonbrequired—

cro

app_log

Ops-support structured log. Also acts as the transactional outbox for buffered events (per CLAUDE.md event bus default). Not regulated; no provenance requirement.

Audit
ColumnTypeKeyReferencesNotes
iduuidPK—
leveltextrequired—
componenttextrequired—
messagetextrequired—
provenance_iduuidFK→ cro.provenance_event
payloadjsonbrequired—
logged_attimestamptzrequired—