Created
July 12, 2024 10:47
-
-
Save segevfiner/faf1bbacbf8a942635c0115669d6a718 to your computer and use it in GitHub Desktop.
Install pldbgapi in the local Supabase development PostgresSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
project_id=$(sed -nr 's/project_id[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' supabase/config.toml) | |
major_version=$(sed -nr 's/major_version[[:space:]]*=[[:space:]]*([[:digit:]]+)/\1/p' supabase/config.toml) | |
docker exec -i supabase_db_$project_id bash <<EOF | |
set -x | |
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh | |
apt-get install -y postgresql-$major_version-pldebugger | |
psql -h localhost postgres supabase_admin -c "create extension pldbgapi with schema extensions;" | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment