From 4130dcd6fbfa26427e0722ed023d4976782bbb72 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sat, 7 Oct 2023 08:56:50 -0700 Subject: [PATCH] index: document that --clear is now destructive Signed-off-by: Varun Patil --- docs/troubleshooting.md | 1 + lib/Command/Index.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 1be8b51a..09c56cc1 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -83,6 +83,7 @@ If you get this error, it is likely that your database is not using the `utf8mb4 ## Reset If you want to completely reset Memories (e.g. for database trouble), uninstall it from the app store, then run the following SQL on your database to clean up any data. +Note that this can have unintended consequences such as some files appearing as duplicates in the mobile app when you reinstall Memories. ```sql DROP TABLE IF EXISTS oc_memories; diff --git a/lib/Command/Index.php b/lib/Command/Index.php index f6d62e2f..23374331 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -157,6 +157,9 @@ class Index extends Command } if ($this->input->isInteractive()) { + $this->output->writeln('Clearing the index can have unintended consequences like'); + $this->output->writeln('duplicates for some files appearing on the mobile app.'); + $this->output->writeln('Using --force instead of --clear is recommended in most cases.'); $this->output->write('Are you sure you want to clear the existing index? (y/N): '); if ('y' !== trim(fgets(STDIN))) { throw new \Exception('Aborting');