summaryrefslogtreecommitdiff
path: root/db/rest/comment/api_comment.sql
blob: e50ca2f40a19c2449abf11a68b218de6903aa92d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CREATE VIEW api.comment AS
	SELECT
		c.id,
		c.user_id,
		c.post_id,
		c.content,
		c.date
	FROM
		admin.comment c
	ORDER BY id ASC;

GRANT SELECT ON TABLE api.comment
	TO rest_anon, rest_user;
GRANT SELECT ON TABLE admin.comment
	TO rest_anon, rest_user;