Is there a way to clear a document history, other than manual delete from _gristsys_ActionHistory;
with sqlite ? I had a case where the history grew to the point it took more than 600MB.
If you are in the grist-core
repository, you can do something like:
$ yarn cli --help
$ yarn cli history prune docs/gy4qk3Cd3YoNquH6ZjJmDo.grist
Otherwise, there is an undocumented endpoint /api/docs/<docId>/states/remove
:
You can POST
to this with a keep
parameter of 1
(say) to remove all but the last action from history.
The action history will eventually be truncated once it is “big enough”. This area definitely could do with some love and UI options.
2 Likes
Thank you so much! It works like a charm, and moreover it fixed the problem I mentioned here, which was caused (I think) by the rather brutal way in which I had tried to delete the history.
1 Like
ah ok so when I download the Grist document , if it’s that big (> 500MB)
it’s probably because of the Actions History ?
is there a way to export only data without history ?