forked from mtusi2026/mtusi2026lab7
12 lines
699 B
SQL
12 lines
699 B
SQL
REVOKE ALL ON DATABASE messenger FROM PUBLIC;
|
|
GRANT CONNECT ON DATABASE messenger TO api, worker;
|
|
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
|
|
GRANT USAGE ON SCHEMA public TO api, worker;
|
|
GRANT SELECT, INSERT ON users, chats, chat_members, messages, message_idempotency, message_attachments TO api;
|
|
GRANT SELECT, INSERT, UPDATE, DELETE ON sessions TO api;
|
|
GRANT SELECT, INSERT, UPDATE ON attachments, attachment_jobs, attachment_outbox TO api;
|
|
GRANT SELECT ON attachment_variants TO api;
|
|
GRANT SELECT, INSERT ON attachment_attempt_events TO api, worker;
|
|
GRANT SELECT, UPDATE ON attachments, attachment_jobs TO worker;
|
|
GRANT SELECT, INSERT, UPDATE ON attachment_variants, attachment_outbox TO worker;
|