From fff220c7fd3268a6f4e7fc4ec4def3362e454763 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Thu, 2 Feb 2023 03:09:41 -0500 Subject: [PATCH] ci: set schema search path before pg_restore --- docker/scripts/db-pg-import.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/scripts/db-pg-import.sh b/docker/scripts/db-pg-import.sh index c807b8d24..e5dc7ce7e 100644 --- a/docker/scripts/db-pg-import.sh +++ b/docker/scripts/db-pg-import.sh @@ -7,8 +7,11 @@ dropdb -U django --if-exists ietf echo "Create new ietf DB..." createdb -U django ietf -echo "Enable citext extension on ietf DB..." -psql -U django -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'CREATE EXTENSION citext;' +# echo "Enable citext extension on ietf DB..." +# psql -U django -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;' + +echo "Set schema search path for user django..." +psql -U django -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'ALTER USER django set search_path=ietf_utf8,django,public;' echo "Import DB dump into ietf..." pg_restore -U django -d ietf ietf.dump