comment


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('comment_id_seq'::regclass)
action_comment.target_id action_comment_target_id_foreignR
comment.parent_comment_id comment_parent_comment_id_foreignR
comment.reply_to comment_reply_to_foreignR
comment_mentioned_user.comment_id comment_mentioned_user_comment_id_foreignR
report.comment_id report_comment_id_foreignR
uuid uuid 2147483647 null
author_id int8 19 null
user.id comment_author_id_foreignR
article_id int8 19 null
article.id comment_article_id_foreignR
parent_comment_id int8 19 null
comment.id comment_parent_comment_id_foreignR
content text 2147483647 null
state text 2147483647 'active'::text
pinned bool 1 false
created_at timestamptz 35,6 CURRENT_TIMESTAMP
updated_at timestamptz 35,6 CURRENT_TIMESTAMP
quotation_start int4 10 null
quotation_end int4 10 null
quotation_content text 2147483647 null
reply_to int8 19 null
comment.id comment_reply_to_foreignR
remark text 2147483647 null

Indexes

Constraint Name Type Sort Column(s)
comment_pkey Primary key Asc id
comment_article_id_state_index Performance Asc/Asc article_id + state
comment_author_id_state_index Performance Asc/Asc author_id + state
comment_parent_comment_id_state_index Performance Asc/Asc parent_comment_id + state
comment_state_index Performance Asc state
comment_uuid_unique Must be unique Asc uuid

Check Constraints

Constraint Name Constraint
comment_state_check ((state = ANY (ARRAY['active'::text, 'archived'::text, 'banned'::text, 'collapsed'::text])))

Relationships