postgres-init: grant the bingo monitor tables to bingo

asxpio's migration 017 adds bingo_monitor_targets, _samples and
_buckets for datacenterbingo's status page. The migration grants them
itself; list them here too so a fresh install gets the same grants.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-10-18 10:31:01 +04:00
commit d009d2c3d2
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -45,7 +45,8 @@ GRANT USAGE ON SCHEMA public TO bingo;
DO $$
DECLARE t text;
BEGIN
FOREACH t IN ARRAY ARRAY['bingo_datacenters', 'bingo_incidents'] LOOP
FOREACH t IN ARRAY ARRAY['bingo_datacenters', 'bingo_incidents', 'bingo_monitor_targets',
'bingo_monitor_samples', 'bingo_monitor_buckets'] LOOP
IF to_regclass('public.' || t) IS NOT NULL THEN
EXECUTE format('GRANT SELECT ON public.%I TO bingo', t);
ELSE