From 6b5c8e1c5969f16f79bb6e333a24dbe2b8b91be4 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Wed, 23 Jun 2010 11:52:00 +0100 Subject: [PATCH] Add info on deleting old versions. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 00a1a931..0a3e70e6 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,15 @@ And then use it in your tests like this: end +## Deleting Old Versions + +Over time your `versions` table will grow to an unwieldy size. Because each version is self-contained (see the Diffing section above for more) you can simply delete any records you don't want any more. For example: + + sql> delete from versions where created_at < 2010-06-01; + + >> Version.delete_all ["created_at < ?", 1.week.ago] + + ## Installation 1. Install PaperTrail as a gem via your `config/environment.rb`: