Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | bigserial | 19 | √ | nextval('comment_id_seq'::regclass) |
|
|
||||||||||||
uuid | uuid | 2147483647 | null |
|
|
|||||||||||||
int8 | 19 | null |
|
|
||||||||||||||
article_id | int8 | 19 | null |
|
|
|||||||||||||
parent_comment_id | int8 | 19 | √ | null |
|
|
||||||||||||
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 |
|
|
||||||||||||
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]))) |