From 1a2a0cb00672b204b0116fc7c0f8925284bed655 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Thu, 18 Aug 2022 18:36:29 +0000 Subject: [PATCH] drop every trace on reinstall Signed-off-by: Daniel Hansson --- apps/fulltextsearch.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/fulltextsearch.sh b/apps/fulltextsearch.sh index f83e5544..e943f1c1 100644 --- a/apps/fulltextsearch.sh +++ b/apps/fulltextsearch.sh @@ -35,10 +35,13 @@ then else # Ask for removal or reinstallation reinstall_remove_menu "$SCRIPT_NAME" - # Reset database table - check_command sudo -Hiu postgres psql "$NCDB" -c "TRUNCATE TABLE oc_fulltextsearch_ticks;" # Reset Full Text Search to be able to index again, and also remove the app to be able to install it again nextcloud_occ_no_check fulltextsearch:reset + # Drop database tables + check_command sudo -Hiu postgres psql "$NCDB" -c "DROP TABLE oc_fulltextsearch_ticks;" + check_command sudo -Hiu postgres psql "$NCDB" -c "DROP TABLE oc_fulltextsearch_index;" + check_command sudo -Hiu postgres psql "$NCDB" -c "DELETE FROM oc_migrations WHERE app='fulltextsearch';" + check_command sudo -Hiu postgres psql "$NCDB" -c "DELETE FROM oc_preferences WHERE appid='fulltextsearch';" APPS=(fulltextsearch fulltextsearch_elasticsearch files_fulltextsearch) for app in "${APPS[@]}" do