@pgpmjs/core 3.0.8 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,72 +0,0 @@
1
- BEGIN;
2
- DO $do$
3
- BEGIN
4
- BEGIN
5
- EXECUTE format('CREATE ROLE %I LOGIN PASSWORD %L', 'app_user', 'app_password');
6
- EXCEPTION
7
- WHEN duplicate_object THEN
8
- -- Role already exists; optionally sync attributes here with ALTER ROLE
9
- NULL;
10
- END;
11
-
12
- BEGIN
13
- EXECUTE format('CREATE ROLE %I LOGIN PASSWORD %L', 'app_admin', 'admin_password');
14
- EXCEPTION
15
- WHEN duplicate_object THEN
16
- -- Role already exists; optionally sync attributes here with ALTER ROLE
17
- NULL;
18
- END;
19
- END
20
- $do$;
21
-
22
- DO $do$
23
- BEGIN
24
- BEGIN
25
- EXECUTE format('GRANT %I TO %I', 'anonymous', 'app_user');
26
- EXCEPTION
27
- WHEN unique_violation THEN
28
- -- Membership was granted concurrently; ignore.
29
- NULL;
30
- WHEN undefined_object THEN
31
- -- One of the roles doesn't exist yet; order operations as needed.
32
- RAISE NOTICE 'Missing role when granting % to %', 'anonymous', 'app_user';
33
- END;
34
-
35
- BEGIN
36
- EXECUTE format('GRANT %I TO %I', 'authenticated', 'app_user');
37
- EXCEPTION
38
- WHEN unique_violation THEN
39
- NULL;
40
- WHEN undefined_object THEN
41
- RAISE NOTICE 'Missing role when granting % to %', 'authenticated', 'app_user';
42
- END;
43
-
44
- BEGIN
45
- EXECUTE format('GRANT %I TO %I', 'anonymous', 'administrator');
46
- EXCEPTION
47
- WHEN unique_violation THEN
48
- NULL;
49
- WHEN undefined_object THEN
50
- RAISE NOTICE 'Missing role when granting % to %', 'anonymous', 'administrator';
51
- END;
52
-
53
- BEGIN
54
- EXECUTE format('GRANT %I TO %I', 'authenticated', 'administrator');
55
- EXCEPTION
56
- WHEN unique_violation THEN
57
- NULL;
58
- WHEN undefined_object THEN
59
- RAISE NOTICE 'Missing role when granting % to %', 'authenticated', 'administrator';
60
- END;
61
-
62
- BEGIN
63
- EXECUTE format('GRANT %I TO %I', 'administrator', 'app_admin');
64
- EXCEPTION
65
- WHEN unique_violation THEN
66
- NULL;
67
- WHEN undefined_object THEN
68
- RAISE NOTICE 'Missing role when granting % to %', 'administrator', 'app_admin';
69
- END;
70
- END
71
- $do$;
72
- COMMIT;