I need to create an article system where no articles are ever deleted. Even more, they want all article edits, once the original is saved, to create new articles rather than overwrite the old ones.
So, person A writes article 1 and saves it. Person B edits article 1.
What is the best way to organize this database? My thoughts are:
- articles
- Articles
- id
- old_id (id of article before edit, so that user can 'undo')
- deleted (boolean, if deleted it won't show up in system unless user views 'trash')
- title
- article
- created (redundant?)
- updated (date of last update)
- user_id (id of user who last updated article)
so, when a user edits an article, it creates a new article record but saves the old article id as a reference.
is this the best way to go about it or is there a more efficient way?