Skip to content

Commit

Permalink
DDLS-359b add connect for psql connections readonly user (#1713)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrwarren authored Oct 30, 2024
1 parent d9c415a commit 43cd768
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GRANT CONNECT ON DATABASE api TO readonly_sql_user;
6 changes: 3 additions & 3 deletions orchestration/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ if [ "${DROP_PUBLIC}" == "yes" ]; then
echo "Recreating the public schema"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema public cascade; create schema public;"
echo "Dropping the ddls145 schema"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema ddls145 cascade;"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema if exists ddls145 cascade;"
echo "Dropping the ddls330 schema"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema ddls330 cascade;"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema if exists ddls330 cascade;"
echo "Dropping the audit schema"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema audit cascade;"
psql $POSTGRES_HOST_OPTS -d $POSTGRES_DATABASE -c "drop schema if exists audit cascade;"
fi

echo "Restoring ${LATEST_BACKUP}"
Expand Down

0 comments on commit 43cd768

Please sign in to comment.