Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.37 KB

public.post_comment_stars.md

File metadata and controls

48 lines (36 loc) · 1.37 KB

public.post_comment_stars

Description

Table Definition
CREATE MATERIALIZED VIEW post_comment_stars AS (
 SELECT cs.id,
    cu.username AS comment_user,
    csu.username AS comment_star_user,
    cs.created,
    cs.updated
   FROM (((comments c
     LEFT JOIN comment_stars cs ON (((cs.comment_post_id = c.id) AND (cs.comment_user_id = c.user_id))))
     LEFT JOIN users cu ON ((cu.id = cs.comment_user_id)))
     LEFT JOIN users csu ON ((csu.id = cs.user_id)))
)

Columns

Name Type Default Nullable Children Parents Comment
id uuid true
comment_user varchar(50) true
comment_star_user varchar(50) true
created timestamp without time zone true
updated timestamp without time zone true

Referenced Tables

Name Columns Comment Type
public.comments 7 Comments
Multi-line
table
comment
BASE TABLE
public.comment_stars 6 BASE TABLE
public.users 6 Users table BASE TABLE

Relations

er


Generated by tbls