diff --git a/scripts/install b/scripts/install index 04f2153..53a683d 100755 --- a/scripts/install +++ b/scripts/install @@ -115,6 +115,8 @@ EOF #================================================= ynh_script_progression --message="Install weblate using PIP..." --time --weight=1 +ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name + virtualenv --python=python3 "${final_path}/venv" chown -R "$app": "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 5f40aea..1afc53d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -240,9 +240,10 @@ else current_version=3 fi +ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name + if [ "$current_version" -lt "4" ]; then - ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name upgrade "4.1.1" "../conf/settings.4.1.1.py" fi