Closed ahxxm closed 10 months ago
Hmm, it seems that the setting is no longer stored in the database, but the settings.json
file. So this is the reason why it sets it to 90.
However, even if you disable your notes history, the revisionService.ttlDays
won't be changed. Only the revisionService.enabled
will be set to false
.
Let's say you had your notes history at 10 days. Then you decided to turn off that feature. The notes that had revisions are still composed of the note + the revisions. Joplin will stitch them together and present it to you as one note. So if you were to delete resources that are referenced in any of those "revision" files, you'd be missing data.
This is why setting this to 0
can cause data loss.
I don't know, whether the note revisions will ever be combined to a single note again (and the revision files are purged) internally, when you turn off revisions. This would be a question for @laurent22
I would have to change the script to retrieve the data from the settings.json
file. It won't be a be big change, but it will create an additional dependency. jq
will be required on the system where you run the script.
I used zsh by the way, does
-z
behave the same in both shells?
The script still uses bash, so it doesn't matter. But yes, they behave the same.
fixed by e86aa3045543fa8688f4b1ca3fbefce7cd43dbf7
the script respects note history settings by default with this check
However when I disabled note history, and execute the SQL statement in sqlite, it returns empty result, but the script goes into the next line anyway, thus I need to wait for 90 days to delete "just orphaned" resources
I used zsh by the way, does
-z
behave the same in both shells?