   is 'The kind of post (post, proposal, vote).';
 comment on column sg_public.post.body
   is 'The body or main content of the post.';
-comment on column sg_public.post.replies_to_id
+comment on column sg_public.post.parent_id
   is 'If the post is a reply, which post it replies to.';
 comment on column sg_public.post.response
   is 'If the post is a vote, yes/no on approving.';

  for each row execute procedure sg_private.update_modified_column();
comment on trigger update_post_modified on sg_public.post
  is 'Whenever a post changes, update the `modified` column.';

create trigger update_post_entity_version_modified
  before update on sg_public.post_entity_version

-- Insert post: any.
grant insert on table sg_public.post to sg_anonymous, sg_user, sg_admin;
create policy insert_post on sg_public.post
  for insert (topic_id, kind, body, parent_id, response) -- any user
  using (true);

-- Update post: user self (body, response), or admin.
