Table: comments
Ce contenu n’est pas encore disponible dans votre langue.
Connected to
Section titled “Connected to”This table references:
comments(id) via columnparent_idfederation_peers(id) via columnpeer_id
Referenced by:
comments— columnparent_id
Columns
Section titled “Columns”| Column | Type | Nullable | Notes |
|---|---|---|---|
id | uuid | no | Default gen_random_uuid() |
target_kind | text | no | — |
target_id | uuid | no | — |
parent_id | uuid | yes | References comments(id) |
root_id | uuid | no | — |
depth | integer | no | Default 0 |
author_user_ref | bigint | yes | — |
body | text | no | — |
body_html | text | no | Default ''::text |
annotation_type | text | yes | — |
annotation_data | jsonb | yes | — |
like_count | bigint | no | Default 0 |
edited_at | timestamp | yes | — |
deleted_at | timestamp | yes | — |
origin_server_id | uuid | yes | — |
created_at | timestamp | no | Default now() |
updated_at | timestamp | no | Default now() |
peer_id | uuid | yes | References federation_peers(id) |
actor_uri | text | yes | — |
activity_uri | text | yes | — |
Constraints
Section titled “Constraints”CONSTRAINT comments_annotation_type_check CHECK ((annotation_type = ANY (ARRAY['point'::text, 'rect'::text, 'timestamp'::text, 'frame'::text, 'whiteboard'::text, 'text-range'::text])))CONSTRAINT comments_origin_check CHECK ((((author_user_ref IS NOT NULL) AND (peer_id IS NULL) AND (actor_uri IS NULL)) OR ((author_user_ref IS NULL) AND (peer_id IS NOT NULL) AND (actor_uri IS NOT NULL))))CONSTRAINT comments_target_kind_check CHECK ((target_kind = ANY (ARRAY['post'::text, 'asset'::text, 'collection'::text])))
Full DDL
Section titled “Full DDL”CREATE TABLE public.comments ( id uuid DEFAULT gen_random_uuid() NOT NULL, target_kind text NOT NULL, target_id uuid NOT NULL, parent_id uuid, root_id uuid NOT NULL, depth integer DEFAULT 0 NOT NULL, author_user_ref bigint, body text NOT NULL, body_html text DEFAULT ''::text NOT NULL, annotation_type text, annotation_data jsonb, like_count bigint DEFAULT 0 NOT NULL, edited_at timestamp with time zone, deleted_at timestamp with time zone, origin_server_id uuid, created_at timestamp with time zone DEFAULT now() NOT NULL, updated_at timestamp with time zone DEFAULT now() NOT NULL, peer_id uuid, actor_uri text, activity_uri text, CONSTRAINT comments_annotation_type_check CHECK ((annotation_type = ANY (ARRAY['point'::text, 'rect'::text, 'timestamp'::text, 'frame'::text, 'whiteboard'::text, 'text-range'::text]))), CONSTRAINT comments_origin_check CHECK ((((author_user_ref IS NOT NULL) AND (peer_id IS NULL) AND (actor_uri IS NULL)) OR ((author_user_ref IS NULL) AND (peer_id IS NOT NULL) AND (actor_uri IS NOT NULL)))), CONSTRAINT comments_target_kind_check CHECK ((target_kind = ANY (ARRAY['post'::text, 'asset'::text, 'collection'::text]))));Please see the schema overview for context. This document was last regenerated on 2026-07-26T08:25:29.520Z.