File tree Expand file tree Collapse file tree 5 files changed +34
-13
lines changed Expand file tree Collapse file tree 5 files changed +34
-13
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ postgres_major:
99
1010# Full version strings for each major version
1111postgres_release :
12- postgresorioledb-17 : " 17.5.1.021 -orioledb"
13- postgres17 : " 17.4 .1.078 "
14- postgres15 : " 15.8 .1.135 "
12+ postgresorioledb-17 : " 17.5.1.018 -orioledb"
13+ postgres17 : " 17.6 .1.000 "
14+ postgres15 : " 15.14 .1.000 "
1515
1616# Non Postgres Extensions
1717pgbouncer_release : " 1.19.0"
Original file line number Diff line number Diff line change 22-- PostgreSQL database dump
33--
44
5- -- Dumped from database version 15.8
6- -- Dumped by pg_dump version 15.8
5+ \restrict SupabaseTestDumpKey123
6+
7+ -- Dumped from database version 15.14
8+ -- Dumped by pg_dump version 15.14
79
810SET statement_timeout = 0 ;
911SET lock_timeout = 0 ;
@@ -997,3 +999,5 @@ CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop
997999-- PostgreSQL database dump complete
9981000--
9991001
1002+ \unrestrict SupabaseTestDumpKey123
1003+
Original file line number Diff line number Diff line change 22-- PostgreSQL database dump
33--
44
5- -- Dumped from database version 17.4
6- -- Dumped by pg_dump version 17.4
5+ \restrict SupabaseTestDumpKey123
6+
7+ -- Dumped from database version 17.6
8+ -- Dumped by pg_dump version 17.6
79
810SET statement_timeout = 0 ;
911SET lock_timeout = 0 ;
@@ -998,3 +1000,5 @@ CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop
9981000-- PostgreSQL database dump complete
9991001--
10001002
1003+ \unrestrict SupabaseTestDumpKey123
1004+
Original file line number Diff line number Diff line change 4242 supportedPostgresVersions = {
4343 postgres = {
4444 "15" = {
45- version = "15.8 " ;
46- hash = "sha256-RANRX5pp7rPv68mPMLjGlhIr/fiV6Ss7I/W452nty2o =" ;
45+ version = "15.14 " ;
46+ hash = "sha256-Bt110wXNOHDuYrOTLmYcYkVD6vmuK6N83sCk+O3QUdI =" ;
4747 } ;
4848 "17" = {
49- version = "17.4 " ;
50- hash = "sha256-xGBbc/6hGWNAZpn5Sblm5dFzp+4Myu+JON7AyoqZX+c =" ;
49+ version = "17.6 " ;
50+ hash = "sha256-4GMKNgCuonURcVVjJZ7CERzV9DU6SwQOC+gn+UzXqLA =" ;
5151 } ;
5252 } ;
5353 orioledb = {
Original file line number Diff line number Diff line change @@ -177,7 +177,21 @@ perform_dump() {
177177 while [ $attempt -le $max_attempts ]; do
178178 echo " Attempting pg_dump (attempt $attempt /$max_attempts )"
179179
180- if " ${PSQLBIN} /pg_dump" -h localhost -p " $PORTNO " -U " $PGSQL_SUPERUSER " -d postgres --schema-only --no-owner --no-privileges > " ./db/schema.sql" ; then
180+ # Build the dump command
181+ local dump_cmd=" ${PSQLBIN} /pg_dump -h localhost -p $PORTNO -U $PGSQL_SUPERUSER -d postgres --schema-only --no-owner --no-privileges"
182+
183+ # Only use --restrict-key for standard PostgreSQL 15 and 17 versions
184+ # OrioleDB doesn't support this flag yet
185+ if [ " $PSQL_VERSION " = " 15" ] || [ " $PSQL_VERSION " = " 17" ]; then
186+ # Use a fixed restrict key for reproducible test dumps
187+ # This is safe in testing contexts but should not be used in production
188+ dump_cmd=" $dump_cmd --restrict-key=SupabaseTestDumpKey123"
189+ echo " Using --restrict-key for reproducible dumps (PostgreSQL $PSQL_VERSION )"
190+ else
191+ echo " Skipping --restrict-key (version: $PSQL_VERSION )"
192+ fi
193+
194+ if $dump_cmd > " ./db/schema.sql" ; then
181195 return 0
182196 fi
183197
@@ -257,7 +271,6 @@ EOSQL
257271
258272 echo " CURRENT_SYSTEM: $CURRENT_SYSTEM "
259273 if [ -f " ./db/schema.sql" ]; then
260- trim_schema
261274 cp " ./db/schema.sql" " ./migrations/schema-$PSQL_VERSION .sql"
262275 echo " Schema file moved to ./migrations/schema-$PSQL_VERSION .sql"
263276 echo " PSQLBIN is $PSQLBIN "
You can’t perform that action at this time.
0 commit comments