I just starting a project, I would like to have a small content manager with version control. However I don’t know what is the best way to model the database.
I have content table which contains the following fields:
id primary key serial,
content_id int (field to identify diferent contents),
title varchar,
content longtext,
version int default ‘1’,
create_date date,
I have seen some CMS separes the revisions in another table than the actual revision, What’s the best way? Is there any optimized way?
Thanks!
I designed something like this and here’s the gist of it;
So every transaction that you have on that table, you have a corresponding record in VER_CUSTOMER table with RECORD_ID and table’s natural PK as PK. For example if CUSTOMER table’s PK is CUST_ID. PK of VER_CUSTOMER will be composite CUST_ID and RECORD_ID.
Hope this helps…