index: document that --clear is now destructive

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/807/merge
Varun Patil 2023-10-07 08:56:50 -07:00
parent 094a57e644
commit 4130dcd6fb
2 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,7 @@ If you get this error, it is likely that your database is not using the `utf8mb4
## Reset ## 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. 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 ```sql
DROP TABLE IF EXISTS oc_memories; DROP TABLE IF EXISTS oc_memories;

View File

@ -157,6 +157,9 @@ class Index extends Command
} }
if ($this->input->isInteractive()) { if ($this->input->isInteractive()) {
$this->output->writeln('<error>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.</error>');
$this->output->write('Are you sure you want to clear the existing index? (y/N): '); $this->output->write('Are you sure you want to clear the existing index? (y/N): ');
if ('y' !== trim(fgets(STDIN))) { if ('y' !== trim(fgets(STDIN))) {
throw new \Exception('Aborting'); throw new \Exception('Aborting');