PostgreSQL in your app, without a server.
Recent revisions are kept. Restoring one creates a new revision.