Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
{“what”:“Unique integer identifier for each comment.”,“why”:“Without it, comments cannot be uniquely referenced or updated.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.600164938+00:00”} |
|||||||
| parent_comment_id | int4 | 10 | √ | null |
|
|
{“what”:“ID of the comment this is a reply to; null for top-level.”,“why”:“Without it, reply threads cannot be reconstructed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.621913346+00:00”} |
|||||||
| target_type | varchar | 50 | 'document'::character varying |
|
|
{“what”:“Type of the object the comment is attached to, e.g. ‘document’.”,“why”:“Without it, the comment’s target is ambiguous across multiple object types.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.634199297+00:00”} |
||||||||
| target_id | int4 | 10 | null |
|
|
{“what”:“ID of the object (of target_type) this comment belongs to.”,“why”:“Without it, comments cannot be linked to their parent object.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.646794512+00:00”} |
||||||||
| child_target_id | text | 2147483647 | √ | null |
|
|
{“what”:“Optional ID of a sub-part within the target, e.g. a line or block.”,“why”:“Without it, comments on specific sub-elements cannot be distinguished from general ones.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.657601822+00:00”} |
|||||||
| creator_id | int4 | 10 | null |
|
|
{“what”:“ID of the user who wrote the comment.”,“why”:“Without it, authorship and permissions cannot be determined.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.669580318+00:00”} |
||||||||
| content | text | 2147483647 | null |
|
|
{“what”:“Plain-text body of the comment.”,“why”:“Without it, there is nothing to display or moderate.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.679571692+00:00”} |
||||||||
| is_resolved | bool | 1 | false |
|
|
{“what”:“Flag indicating whether the comment thread is resolved.”,“why”:“Without it, resolved state is unknown, so moderators cannot filter open issues.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.692082914+00:00”} |
||||||||
| created_at | timestamptz | 35,6 | now() |
|
|
{“what”:“Timestamp when the comment was created.”,“why”:“Without it, ordering and time-based queries are impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.703963056+00:00”} |
||||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
{“what”:“Timestamp of the last edit to the comment.”,“why”:“Without it, edit history and stale content cannot be detected.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.717752079+00:00”} |
||||||||
| deleted_at | timestamptz | 35,6 | √ | null |
|
|
{“what”:“Timestamp when the comment was soft-deleted; null if active.”,“why”:“Without it, deleted comments cannot be hidden while preserving history.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.735960996+00:00”} |
|||||||
| content_html | text | 2147483647 | √ | null |
|
|
{“what”:“Rendered HTML version of the comment content.”,“why”:“Without it, rendering must be done on every read, slowing display.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:03:12.748607026+00:00”} |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| comment_pkey | Primary key | Asc | id |
| idx_comment_creator_id | Performance | Asc | creator_id |
| idx_comment_entity | Performance | Asc/Asc | target_type + target_id |
| idx_comment_parent_comment_id | Performance | Asc | parent_comment_id |