From 82fb6e2721abe3d7fee02a8347a99bec18fccbdb Mon Sep 17 00:00:00 2001 From: anmol26s Date: Fri, 1 Jun 2018 22:30:13 +0530 Subject: [PATCH] Added UTF8 encoding for database in restore --- scripts/restore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 79691ac..5deaca9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -112,7 +112,9 @@ ynh_install_app_dependencies postgresql ffmpeg redis-server redis-tools mailutil #================================================= ynh_psql_test_if_first_run -ynh_psql_setup_db "$app" "$db_name" "$db_pwd" +ynh_psql_create_user "$app" "$db_pwd" +ynh_psql_execute_as_root \ +"CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $app;" ynh_psql_execute_file_as_root ./db.sql "$db_name" #=================================================