55
66# Default values
77PSQL_VERSION=" 15"
8- MIGRATION_FILE=" "
98PORTNO=" @PGSQL_DEFAULT_PORT@"
109PSQL_USER=" postgres"
1110
@@ -15,7 +14,6 @@ print_help() {
1514 echo
1615 echo " Options:"
1716 echo " -v, --version [15|16|orioledb-16] Specify the PostgreSQL version to use (required)"
18- echo " -f, --file FILE Provide a custom migration script"
1917 echo " -u, --user USER Specify the user/role to use (default: postgres)"
2018 echo " -h, --help Show this help message"
2119 echo
@@ -29,7 +27,6 @@ print_help() {
2927 echo " Examples:"
3028 echo " nix run .#start-client"
3129 echo " nix run .#start-client -- --version 15"
32- echo " nix run .#start-client -- --version 16 --file custom_migration.sql"
3330 echo " nix run .#start-client -- --version 16 --port 5433"
3431 echo " nix run .#start-client -- --version 16 --user supabase_admin"
3532}
@@ -46,15 +43,6 @@ while [[ "$#" -gt 0 ]]; do
4643 exit 1
4744 fi
4845 ;;
49- -f|--file)
50- if [[ -n " $2 " && ! " $2 " =~ ^- ]]; then
51- MIGRATION_FILE=" $2 "
52- shift 2
53- else
54- echo " Error: --file requires a filename"
55- exit 1
56- fi
57- ;;
5846 -u|--user)
5947 if [[ -n " $2 " && ! " $2 " =~ ^- ]]; then
6048 PSQL_USER=" $2 "
@@ -115,11 +103,5 @@ export PATH=$BINDIR/bin:$PATH
115103export POSTGRES_DB=postgres
116104export POSTGRES_HOST=localhost
117105
118- PGSQL_SUPERUSER=@PGSQL_SUPERUSER@
119- MIGRATIONS_DIR=@MIGRATIONS_DIR@
120- POSTGRESQL_SCHEMA_SQL=@POSTGRESQL_SCHEMA_SQL@
121- PGBOUNCER_AUTH_SCHEMA_SQL=@PGBOUNCER_AUTH_SCHEMA_SQL@
122- STAT_EXTENSION_SQL=@STAT_EXTENSION_SQL@
123-
124106# Start interactive psql session
125107exec psql -U " $PSQL_USER " -p " $PORTNO " -h localhost postgres
0 commit comments