Keeping page changes history. A bit like SO does for revisions

前端 未结 3 1855
隐瞒了意图╮
隐瞒了意图╮ 2021-01-02 06:24

I have a CMS system that stores data across tables like this:

Entries Table
+----+-------+------+--------+--------+
| id | title | text | index1 | index2 |
+         


        
3条回答
  •  情深已故
    2021-01-02 06:47

    Have a look at this question: How to version control a record in a database

    Why not have a separate history_table for each table (as per the accepted answer on the linked question)? That simply has a compound primary key of the original tables' PK and the revision number. You will still need to store the data somewhere after all.

提交回复
热议问题