-- Set passwords for Supabase internal roles to match POSTGRES_PASSWORD.
-- The supabase/postgres image creates these roles with hardcoded default passwords;
-- this script overrides them so all services can authenticate with POSTGRES_PASSWORD.
-- Runs once on first container start (docker-entrypoint-initdb.d).
-- Must run as supabase_admin (superuser) which this image uses for initdb scripts.

ALTER ROLE authenticator          WITH PASSWORD 'REPLACE_PASSWORD';
ALTER ROLE supabase_auth_admin    WITH PASSWORD 'REPLACE_PASSWORD';
ALTER ROLE supabase_replication_admin WITH PASSWORD 'REPLACE_PASSWORD';
ALTER ROLE supabase_storage_admin WITH PASSWORD 'REPLACE_PASSWORD';
ALTER ROLE pgbouncer              WITH PASSWORD 'REPLACE_PASSWORD';
