ci: set schema search path before pg_restore

This commit is contained in:
Nicolas Giard 2023-02-02 03:09:41 -05:00 committed by GitHub
parent 85b352676b
commit fff220c7fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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