views:

55

answers:

1

I have content stored in a table with the following schema:

id unsigned int primary_key,
name varchar(20)

I have two levels of users:
1.Content editor: Who can change content and submit for approval(involves deleting rows as well as editing fields)
2.Content admin: Who can see changes and approve them.

The content editor works on a copy of the master table, and submits changes. These changes are later approved by admin and is committed to the master table.

The challenge here is that the master table can change in structure. So if I were to write this change management infrastructure as a separate code, it will be difficult to maintain the code with changing structure of the master table.

I am wondering if there is any off-the-shelf infrastructure to do this?

Thanks in advance

A: 

Why are you using different tables? Your record just had a different status, waiting for approval, it's not a different kind of data. A single table with an extra column, status, will also solv your problem.

Frank Heikens