Store history in rethinkdb