1 create table user_mention (
3 recipient_id int references user_ on update cascade on delete cascade not null,
4 comment_id int references comment on update cascade on delete cascade not null,
5 read boolean default false not null,
6 published timestamp not null default now(),
7 unique(recipient_id, comment_id)
10 create view user_mention_view as
13 um.id as user_mention_id,
25 c.banned_from_community,
34 from user_mention um, comment_view c
35 where um.comment_id = c.id;