File tree Expand file tree Collapse file tree
database_admin/migrations Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11CREATE SCHEMA IF NOT EXISTS inventory;
22
3+ CREATE USER cyndi ;
4+
35-- The admin ROLE that allows the inventory schema to be managed
46DO $$
57BEGIN
Original file line number Diff line number Diff line change 1- DO $$
2- BEGIN
3- REVOKE cyndi_reader FROM listener;
4- EXCEPTION WHEN undefined_object THEN NULL ;
5- END
6- $$;
7-
8- DO $$
9- BEGIN
10- REVOKE cyndi_reader FROM evaluator;
11- EXCEPTION WHEN undefined_object THEN NULL ;
12- END
13- $$;
14-
15- DO $$
16- BEGIN
17- REVOKE cyndi_reader FROM manager;
18- EXCEPTION WHEN undefined_object THEN NULL ;
19- END
20- $$;
21-
22- DO $$
23- BEGIN
24- REVOKE cyndi_reader FROM vmaas_sync;
25- EXCEPTION WHEN undefined_object THEN NULL ;
26- END
27- $$;
28-
29- DO $$
30- BEGIN
31- REVOKE cyndi_admin FROM cyndi;
32- EXCEPTION WHEN undefined_object THEN NULL ;
33- END
34- $$;
35-
36- DO $$
37- BEGIN
38- IF EXISTS (SELECT 1 FROM pg_namespace WHERE nspname = ' inventory' ) THEN
39- EXECUTE ' REVOKE ALL PRIVILEGES ON SCHEMA inventory FROM cyndi_admin' ;
40- END IF;
41- END
42- $$;
43-
44- DO $$
45- BEGIN
46- IF EXISTS (SELECT 1 FROM pg_namespace WHERE nspname = ' inventory' ) THEN
47- EXECUTE ' REVOKE USAGE ON SCHEMA inventory FROM cyndi_reader' ;
48- END IF;
49- END
50- $$;
51-
52- DROP ROLE IF EXISTS cyndi_admin;
53-
54- DROP ROLE IF EXISTS cyndi_reader;
55-
561DROP SCHEMA IF EXISTS inventory CASCADE;
57-
582DROP USER IF EXISTS cyndi;
3+ DROP ROLE IF EXISTS cyndi_reader;
4+ DROP ROLE IF EXISTS cyndi_admin;
You can’t perform that action at this time.
0 commit comments