1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00
This commit is contained in:
Sylvain 2024-03-28 18:33:41 +01:00
parent 7a3f3d17ef
commit 788f9f5a28

View file

@ -260,6 +260,10 @@ myynh_dump_psql_db() {
# Restore the database
myynh_restore_psql_db() {
# https://github.com/immich-app/immich/issues/5630#issuecomment-1866581570
ynh_replace_string --match_string="SELECT pg_catalog.set_config('search_path', '', false);" \
--replace_string="SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);" --target_file=target_file
sudo --login --user=postgres PGUSER=postgres PGPASSWORD="$(cat $PSQL_ROOT_PWD_FILE)" \
psql --cluster="$postgresql_version/main" --dbname="$app" < ./db.sql
}