Created
August 27, 2020 13:54
-
-
Save mgirard772/8797ef064af57127debbd211a63b7c56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE public.comments | |
( | |
id VARCHAR(36) primary key, | |
asset CHARACTER varying, | |
body CHARACTER varying, | |
commentable VARCHAR(36), | |
commentabletype CHARACTER varying, | |
companyid VARCHAR(36), | |
createdat timestamp WITHOUT time zone DEFAULT ('now'::text)::timestamp with time zone, | |
notifcationsenabled boolean DEFAULT FALSE, | |
updatedat timestamp WITHOUT time zone DEFAULT ('now'::text)::timestamp with time zone, | |
userid varchar(36), | |
videoasset CHARACTER varying, | |
childrencount int, | |
clientid varchar(36), | |
parentcommentid varchar(36), | |
foreign key (companyid) references public.companies(id), | |
foreign key (userid) references public.users(id), | |
foreign key (clientid) references public.clients(id) | |
) | |
DISTSTYLE EVEN | |
INTERLEAVED SORTKEY (clientid, companyid, userid, commentabletype, commentable, id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment