Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions prisma/migrations/20260902150000_grant_young_event/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- The app runtime role reads YoungEvent for the public catalog pages and
-- APIs; writes happen through the migrator role during static imports.
-- No-op when life_ustc_runtime is not provisioned (local CI Postgres).
DO $grant_young_event$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_roles WHERE rolname = 'life_ustc_runtime'
) THEN
RAISE NOTICE 'Skipping young event grants; role life_ustc_runtime does not exist.';
RETURN;
END IF;

GRANT SELECT ON TABLE "YoungEvent"
TO life_ustc_runtime;
END
$grant_young_event$;