feat: supabase schema migrations + kong gateway config

This commit is contained in:
2026-06-16 19:06:50 +02:00
parent 1c798efe15
commit d32ce26d9e
4 changed files with 140 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<'EOSQL'
-- Create authenticator role (no-login, used by PostgREST)
DO $$
BEGIN
IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'authenticator') THEN
CREATE ROLE authenticator NOLOGIN;
END IF;
END
$$;
-- Grant authenticator usage on public schema and read access to all tables
GRANT USAGE ON SCHEMA public TO authenticator;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO authenticator;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO authenticator;
EOSQL