File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1
- -- create grafana user if it does not exist
2
- DO
3
- $do$
4
- BEGIN
5
- IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = ' grafana' ) THEN
6
- CREATE USER grafana WITH PASSWORD ' GRAFANA_PASSWORD' ;
7
- GRANT USAGE ON SCHEMA public TO grafana;
8
- GRANT SELECT ON public .timing TO grafana;
9
- END IF;
10
- END
11
- $do$;
12
-
13
1
-- create tables
14
2
CREATE TABLE IF NOT EXISTS conversations (
15
3
conversation_id INTEGER NOT NULL ,
@@ -47,3 +35,15 @@ CREATE TABLE IF NOT EXISTS timing (
47
35
PRIMARY KEY (mid),
48
36
FOREIGN KEY (mid) REFERENCES conversations(message_id)
49
37
);
38
+
39
+ -- create grafana user if it does not exist
40
+ DO
41
+ $do$
42
+ BEGIN
43
+ IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = ' grafana' ) THEN
44
+ CREATE USER grafana WITH PASSWORD ' GRAFANA_PASSWORD' ;
45
+ GRANT USAGE ON SCHEMA public TO grafana;
46
+ GRANT SELECT ON public .timing TO grafana;
47
+ END IF;
48
+ END
49
+ $do$;
You can’t perform that action at this time.
0 commit comments