Files
threadcount-community/prisma/migrations/20260912060000_ops_reveal_grants/migration.sql
T
ThreadCount 46a1911c1c ThreadCount Community edition
Uniform stock management for healthcare linen rooms: the coordinator app, the phone counter and the staff app, for your own server. Built from 5470a36 on 2026-09-13. Licensed under the Functional Source License (FSL-1.1-ALv2).
2026-09-13 11:35:40 +10:00

14 lines
496 B
SQL

--
-- stray query in a projection would.
--
-- Created by hand as postgres before this migration reaches the box:
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'ops_reveal') THEN
RAISE NOTICE 'ops_reveal does not exist — grants skipped; create the role, then apply this block by hand';
RETURN;
END IF;
GRANT USAGE ON SCHEMA public TO ops_reveal;
GRANT SELECT ("id", "coordinator", "coordinatorEmail", "coordinatorPhone") ON "Facility" TO ops_reveal;
END $$;