diff --git a/_scripts/db/dumps/domifa_test.postgres.custom.gz b/_scripts/db/dumps/domifa_test.postgres.custom.gz index 8c8d9e963b..c9ab7a8bc9 100644 Binary files a/_scripts/db/dumps/domifa_test.postgres.custom.gz and b/_scripts/db/dumps/domifa_test.postgres.custom.gz differ diff --git a/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql b/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql index ba5dc1de72..10a1762acd 100644 --- a/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql +++ b/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql @@ -143,14 +143,6 @@ COPY public.open_data_places (uuid, "createdAt", "updatedAt", version, nom, adre \. --- --- Data for Name: spatial_ref_sys; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY public.spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) FROM stdin; -\. - - -- -- Data for Name: structure_doc; Type: TABLE DATA; Schema: public; Owner: - -- diff --git a/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql b/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql index df49c0059d..1e420486ad 100644 --- a/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql +++ b/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql @@ -169,14 +169,6 @@ COPY public.open_data_places (uuid, "createdAt", "updatedAt", version, nom, adre \. --- --- Data for Name: spatial_ref_sys; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY public.spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) FROM stdin; -\. - - -- -- Data for Name: structure_doc; Type: TABLE DATA; Schema: public; Owner: - -- diff --git a/_scripts/db/make-dump-data-only-docker.sh b/_scripts/db/make-dump-data-only-docker.sh index 1bb1f1ec78..40630f50b7 100755 --- a/_scripts/db/make-dump-data-only-docker.sh +++ b/_scripts/db/make-dump-data-only-docker.sh @@ -22,10 +22,10 @@ case $i in ;; --dump=*) DUMP_ENV="${i#*=}" - ;; + ;; --column-inserts=*) COLUMN_INSERTS="--column-inserts" - ;; + ;; --exclude-table=*) TABLE_TO_EXCLUDE="${i#*=}" if [ "" != "${TABLE_TO_EXCLUDE}" ] @@ -69,7 +69,7 @@ echo "########################################################################## echo "" (set -x && docker exec ${POSTGRES_CONTAINER_NAME} bash -c "\ -(set -x && pg_dump --dbname=${POSTGRES_DUMP_FROM_DATABASE} --username=\${POSTGRES_USER} ${COLUMN_INSERTS} --data-only --no-owner --format=plain ${EXCLUDE_TABLE} --exclude-table=migrations_id_seq --file=${POSTGRES_DUMP_PATH}) \ +(set -x && pg_dump --dbname=${POSTGRES_DUMP_FROM_DATABASE} --username=\${POSTGRES_USER} ${COLUMN_INSERTS} --data-only --no-owner --format=plain ${EXCLUDE_TABLE} --exclude-table=migrations_id_seq --exclude-table-data=spatial_ref_sys --file=${POSTGRES_DUMP_PATH}) \ && ls -lah ${POSTGRES_DUMP_PATH} \ ") diff --git a/_scripts/db/make-dump-database-docker.sh b/_scripts/db/make-dump-database-docker.sh index 5e6d339885..a1da3bdf4e 100755 --- a/_scripts/db/make-dump-database-docker.sh +++ b/_scripts/db/make-dump-database-docker.sh @@ -34,7 +34,7 @@ case $i in esac done -if [ -z "${SOURCE_DB_ENV}" ] +if [ -z "${SOURCE_DB_ENV}" ] then echo "" echo "----------------------------------------------------------------------------------------------" @@ -43,7 +43,7 @@ then exit 1 fi -if [ -z "${DUMP_ENV}" ] +if [ -z "${DUMP_ENV}" ] then DUMP_ENV=${SOURCE_DB_ENV} fi @@ -59,7 +59,7 @@ echo "########################################################################## echo "" (set -x && docker exec ${POSTGRES_CONTAINER_NAME} bash -c "\ -(set -x && pg_dump --dbname=${POSTGRES_DUMP_FROM_DATABASE} --username=\${POSTGRES_USER} --no-owner --format=custom --compress=9 --file=${POSTGRES_DUMP_PATH}) \ +(set -x && pg_dump --dbname=${POSTGRES_DUMP_FROM_DATABASE} --exclude-table-data='spatial_ref_sys' --username=\${POSTGRES_USER} --no-owner --format=custom --compress=9 --file=${POSTGRES_DUMP_PATH}) \ && ls -lah ${POSTGRES_DUMP_PATH} \ ")