Skip to content

Commit 025f6f5

Browse files
committed
feat: improve DB restore script
1 parent d5e711e commit 025f6f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ dump_soil_id_db:
118118
pg_dump --format=custom $(DATABASE_URL) -t hwsd2_segment -t hwsd2_data -t landpks_munsell_rgb_lab -t normdist1 -t normdist2 -t wise_soil_data -t wrb2006_to_fao90 -t wrb_fao90_desc -f $(DATABASE_DUMP_FILE)
119119

120120
restore_soil_id_db:
121-
pg_restore --dbname=$(DATABASE_URL) --single-transaction --clean --if-exists --no-owner $(DATABASE_DUMP_FILE)
121+
psql $(DATABASE_URL) -c "CREATE EXTENSION IF NOT EXISTS postgis;"
122+
pg_restore --dbname=$(DATABASE_URL) --clean --if-exists --no-owner --verbose $(DATABASE_DUMP_FILE)
122123
psql $(DATABASE_URL) -c "CLUSTER hwsd2_segment USING hwsd2_segment_shape_idx;"
123124
psql $(DATABASE_URL) -c "ANALYZE;"

0 commit comments

Comments
 (0)