Revionable Behavior
Courtesy of the CakePHP-Assets made by Alkemann at CakePHP-Assets
Clone this plugin to app/plugins/revision
Add the following to either app_model.php
or a specific model you want to keep Revisions of:
public $actsAs = array('Revision.Revision');
Create a shadow table for the models you want to keep revisions of. Duplicate the table (not the contents) and:
- Remove the PRIMARY key from the
id field
- Add a field
version_id
with PRIMARY KEY andauto_increment
- Add a field
version_created
as DATETIME
Extend this README :)