Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions nix/tools/run-client.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

# Default values
PSQL_VERSION="15"
MIGRATION_FILE=""
PORTNO="@PGSQL_DEFAULT_PORT@"
PSQL_USER="postgres"

Expand All @@ -15,7 +14,6 @@ print_help() {
echo
echo "Options:"
echo " -v, --version [15|16|orioledb-16] Specify the PostgreSQL version to use (required)"
echo " -f, --file FILE Provide a custom migration script"
echo " -u, --user USER Specify the user/role to use (default: postgres)"
echo " -h, --help Show this help message"
echo
Expand All @@ -29,7 +27,6 @@ print_help() {
echo "Examples:"
echo " nix run .#start-client"
echo " nix run .#start-client -- --version 15"
echo " nix run .#start-client -- --version 16 --file custom_migration.sql"
echo " nix run .#start-client -- --version 16 --port 5433"
echo " nix run .#start-client -- --version 16 --user supabase_admin"
}
Expand All @@ -46,15 +43,6 @@ while [[ "$#" -gt 0 ]]; do
exit 1
fi
;;
-f|--file)
if [[ -n "$2" && ! "$2" =~ ^- ]]; then
MIGRATION_FILE="$2"
shift 2
else
echo "Error: --file requires a filename"
exit 1
fi
;;
-u|--user)
if [[ -n "$2" && ! "$2" =~ ^- ]]; then
PSQL_USER="$2"
Expand Down Expand Up @@ -115,11 +103,5 @@ export PATH=$BINDIR/bin:$PATH
export POSTGRES_DB=postgres
export POSTGRES_HOST=localhost

PGSQL_SUPERUSER=@PGSQL_SUPERUSER@
MIGRATIONS_DIR=@MIGRATIONS_DIR@
POSTGRESQL_SCHEMA_SQL=@POSTGRESQL_SCHEMA_SQL@
PGBOUNCER_AUTH_SCHEMA_SQL=@PGBOUNCER_AUTH_SCHEMA_SQL@
STAT_EXTENSION_SQL=@STAT_EXTENSION_SQL@

# Start interactive psql session
exec psql -U "$PSQL_USER" -p "$PORTNO" -h localhost postgres
Loading