Is there a way to remove all post revisions from all the posts?

Ok, so it would be something like this, right?

discourse-# \connect discourse
discourse=# delete from post_revisions *;
discourse=# update posts set public_version=1 where public_version>1;
discourse=# update posts set version=1 where version>1;
4 Likes