Procedure Runs
The procedure_runs table tracks every execution of a procedure.
Table Schema
| Column Name | Data Type | Description |
|---|---|---|
id |
UUID |
Primary Key. A unique identifier for the procedure run. |
procedure_id |
UUID |
Foreign Key. References the id of the procedure in the procedures table. |
procedure_run_info |
JSONB |
A JSONB column for storing additional, unstructured information about the procedure run. |
created_at |
TIMESTAMP |
The timestamp when the record was created. Defaults to the current time. |
updated_at |
TIMESTAMP |
The timestamp when the record was last updated. Automatically updates on any modification. |
Constraints and Indexes
- Unique Constraint: A
UniqueConstraintonprocedure_idandprocedure_run_infoensures that each combination is unique. - GIN Index: A GIN index named
idx_procedure_runs_infois applied to theprocedure_run_infocolumn to optimize queries on the JSONB data.
Relationships
procedure: A many-to-one relationship with theprocedurestable, linking each procedure run to the procedure that was executed.