Write revisions and nodes into sqlite file