Skip to content

Commit

Permalink
chore: Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abhvsn committed Oct 2, 2024
1 parent 65b08ba commit e625844
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion deploy/docker/fs/opt/appsmith/pg-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ init_pg_db() {
fi
}
# Utility function to grant permissions to a user on a schema in a database on a host and port in PostgreSQL database
# Args:
# USER (string): User to grant permissions to
# SCHEMA (string): Schema to grant permissions on
# DB (string): Database to grant permissions on
# HOST (string): Host to grant permissions on
# PORT (int): Port to grant permissions on
# Returns:
# None
# Example:
# USER="user" SCHEMA="schema" DB="db" HOST="host" PORT="port" grant_permissions_for_schema
grant_permissions_for_schema() {
local user=${USER-$DB_USER} schema=${SCHEMA-$DB_SCHEMA} db=${DB-$DB_NAME} host=${HOST-$DB_HOST} port=${PORT-$DB_PORT}
tlog "Granting permissions to user '${user}' on schema '$schema' in database '$db' on host '$host' and port '$port'..."
Expand All @@ -158,4 +169,4 @@ grant_permissions_for_schema() {
# waitForPostgresAvailability
# extract_postgres_db_params "postgresql://user:password@localhost:5432/dbname"
# init_pg_db
# grant_permissions_for_schema "user" "schema" "db" "host" "port"
# USER="user" SCHEMA="schema" DB="db" HOST="host" PORT="port" grant_permissions_for_schema

0 comments on commit e625844

Please sign in to comment.