#!/bin/sh
export PGPASSWORD=PYnuOIXNbkVOvdTL
P="psql -h 127.0.0.1 -U bgar1_delta_com -d bgar1_delta_com_ingredi -tA"
echo "== config-ish"
$P -c "select table_name from information_schema.tables where table_schema='public' and (table_name ~ 'config|setting|ldap|saml|auth|sso') order by 1"
echo "== columns with ldap/bind"
$P -c "select table_name||'.'||column_name from information_schema.columns where table_schema='public' and (column_name ~ 'ldap|bind') order by 1"
echo "== columns with password/secret/token"
$P -c "select table_name||'.'||column_name from information_schema.columns where table_schema='public' and (column_name ~ 'password|secret|token') order by 1 limit 80"
