mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-26 08:57:58 +03:00
sunday 5th apr (rip mark hollis) (#52)
* lots of work * feat: move rg-stats in, ensure consistency in db queries * the clocks dont work * almost * ok jesus been and gone now back to usual
This commit is contained in:
@@ -4,3 +4,15 @@ GRANT ALL PRIVILEGES ON DATABASE tachi_dev TO tachi;
|
||||
-- Match genesis: pg_stat_statements (requires shared_preload_libraries in docker-compose).
|
||||
\connect tachi_dev
|
||||
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
|
||||
|
||||
-- Read-only user for Grafana dashboards.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'grafana_ro') THEN
|
||||
CREATE ROLE grafana_ro WITH LOGIN PASSWORD 'grafana_ro';
|
||||
END IF;
|
||||
END$$;
|
||||
GRANT CONNECT ON DATABASE tachi_dev TO grafana_ro;
|
||||
GRANT USAGE ON SCHEMA public TO grafana_ro;
|
||||
GRANT SELECT ON ALL TABLES IN SCHEMA public TO grafana_ro;
|
||||
ALTER DEFAULT PRIVILEGES FOR ROLE tachi IN SCHEMA public GRANT SELECT ON TABLES TO grafana_ro;
|
||||
|
||||
Reference in New Issue
Block a user