File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
migrations/tests/extensions Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1
1
BEGIN ;
2
+ -- create cron extension as supabase_admin
2
3
create extension if not exists pg_cron with schema " extensions" ;
4
+
5
+ -- \ir migrations/db/init-scripts/00000000000003-post-setup.sql
6
+ grant usage on schema cron to postgres with grant option;
7
+ alter default privileges in schema cron grant all on tables to postgres with grant option;
8
+ alter default privileges in schema cron grant all on routines to postgres with grant option;
9
+ alter default privileges in schema cron grant all on sequences to postgres with grant option;
10
+ grant all privileges on all tables in schema cron to postgres with grant option;
11
+ grant all privileges on all routines in schema cron to postgres with grant option;
12
+ grant all privileges on all sequences in schema cron to postgres with grant option;
13
+
14
+ -- postgres role should have access
15
+ set local role postgres;
16
+ select * from cron .job ;
17
+
18
+ -- other roles can be granted access
19
+ grant usage on schema cron to authenticated;
20
+ grant select on all tables in schema cron to authenticated;
21
+
22
+ -- authenticated role should have access now
23
+ set local role authenticated;
24
+ select * from cron .job ;
3
25
ROLLBACK ;
You can’t perform that action at this time.
0 commit comments