Table discourse.public.posts Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
id serial 10  √  nextval('posts_id_seq'::regclass)
user_id int4 10  √  null
topic_id int4 10
post_number int4 10
raw text 2147483647
cooked text 2147483647
created_at timestamp 29,6
updated_at timestamp 29,6
reply_to_post_number int4 10  √  null
reply_count int4 10 0
quote_count int4 10 0
deleted_at timestamp 29,6  √  null
off_topic_count int4 10 0
like_count int4 10 0
incoming_link_count int4 10 0
bookmark_count int4 10 0
avg_time int4 10  √  null
score float8 17,17  √  null
reads int4 10 0
post_type int4 10 1
vote_count int4 10 0
sort_order int4 10  √  null
last_editor_id int4 10  √  null
hidden bool 1 false
hidden_reason_id int4 10  √  null
notify_moderators_count int4 10 0
spam_count int4 10 0
illegal_count int4 10 0
inappropriate_count int4 10 0
last_version_at timestamp 29,6
user_deleted bool 1 false
reply_to_user_id int4 10  √  null
percent_rank float8 17,17  √  1.0
notify_user_count int4 10 0
like_score int4 10 0
deleted_by_id int4 10  √  null
edit_reason varchar 255  √  null
word_count int4 10  √  null
version int4 10 1
cook_method int4 10 1
wiki bool 1 false
baked_at timestamp 29,6  √  null
baked_version int4 10  √  null
hidden_at timestamp 29,6  √  null
self_edits int4 10 0
reply_quoted bool 1 false
via_email bool 1 false
raw_email text 2147483647  √  null
public_version int4 10 1

Table contained 29 rows at Fri Mar 27 12:26 PDT 2015

Indexes:
Column(s) Type Sort Constraint Name
id Primary key Asc posts_pkey
created_at + topic_id Performance Asc/Asc idx_posts_created_at_topic_id
user_id Performance Asc idx_posts_user_id_deleted_at
reply_to_post_number Performance Asc index_posts_on_reply_to_post_number
topic_id + post_number Must be unique Asc/Asc index_posts_on_topic_id_and_post_number
user_id + created_at Performance Asc/Asc index_posts_on_user_id_and_created_at