Hi everyone,
I need to be able to store multiple states of the same record, which are:
- The live version, which visitors to the site will see
- A draft version, which administrators will see in the admin area
- Previous versions, all versions of the record from creation up to now
Certain attributes of the record will be concurrent across all states of the record (such as the record's name, its category) whereas others will need to differ depending on which state is being looked at.
I thought of setting it out something like this:
Code:
widget
id
title
category
widget_content
widget_id
description
state (would be either NEW, CURRENT or OLD)
date
Would this work or are there any obvious pitfalls to this approach?
This is the first time I'll have done something like this so any input into how best to go about implementing this efficiently would be much appreciated.
Sam
Bookmarks