File tree 4 files changed +24
-25
lines changed
4 files changed +24
-25
lines changed Original file line number Diff line number Diff line change
1
+ --
2
+ -- PostgreSQL database dump
3
+ --
4
+
5
+ -- Dumped from database version 15.8
6
+ -- Dumped by pg_dump version 15.8
7
+
1
8
SET statement_timeout = 0 ;
2
9
SET lock_timeout = 0 ;
3
10
SET idle_in_transaction_session_timeout = 0 ;
@@ -1004,8 +1011,3 @@ CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop
1004
1011
-- PostgreSQL database dump complete
1005
1012
--
1006
1013
1007
-
1008
- --
1009
- -- Dbmate schema migrations
1010
- --
1011
-
Original file line number Diff line number Diff line change
1
+ --
2
+ -- PostgreSQL database dump
3
+ --
4
+
5
+ -- Dumped from database version 17.4
6
+ -- Dumped by pg_dump version 17.4
7
+
1
8
SET statement_timeout = 0 ;
2
9
SET lock_timeout = 0 ;
3
10
SET idle_in_transaction_session_timeout = 0 ;
@@ -991,8 +998,3 @@ CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop
991
998
-- PostgreSQL database dump complete
992
999
--
993
1000
994
-
995
- --
996
- -- Dbmate schema migrations
997
- --
998
-
Original file line number Diff line number Diff line change
1
+ --
2
+ -- PostgreSQL database dump
3
+ --
4
+
5
+ -- Dumped from database version 17.0
6
+ -- Dumped by pg_dump version 17.0
7
+
1
8
SET statement_timeout = 0 ;
2
9
SET lock_timeout = 0 ;
3
10
SET idle_in_transaction_session_timeout = 0 ;
@@ -1005,8 +1012,3 @@ CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop
1005
1012
-- PostgreSQL database dump complete
1006
1013
--
1007
1014
1008
-
1009
- --
1010
- -- Dbmate schema migrations
1011
- --
1012
-
Original file line number Diff line number Diff line change @@ -187,17 +187,10 @@ perform_dump() {
187
187
local attempt=1
188
188
189
189
while [ $attempt -le $max_attempts ]; do
190
- echo " Attempting dbmate dump (attempt $attempt /$max_attempts )"
190
+ echo " Attempting pg_dump (attempt $attempt /$max_attempts )"
191
191
192
- # Run dbmate dump
193
- if dbmate dump; then
194
- # Post-process schema.sql to remove schema_migrations INSERT statements
195
- if [ -f " db/schema.sql" ]; then
196
- # Remove INSERT INTO schema_migrations lines
197
- sed -i ' /^INSERT INTO schema_migrations/d' db/schema.sql
198
- echo " Schema dump completed successfully (schema_migrations data removed)"
199
- return 0
200
- fi
192
+ if " ${PSQLBIN} /pg_dump" -h localhost -p " $PORTNO " -U " $PGSQL_SUPERUSER " -d postgres --schema-only --no-owner --no-privileges > " ./db/schema.sql" ; then
193
+ return 0
201
194
fi
202
195
203
196
echo " Dump attempt $attempt failed, waiting before retry..."
You can’t perform that action at this time.
0 commit comments