Realization of version history Function of Website Articles

  node.js, question

As for the version history of the article, a very common function, such as Zhihu, brief book, segmentfault, has relevant version history storage. How to realize this, you can give a reference or url.

When the database stores content, one more version number field is sufficient. Each update inserts a new record