I am building a site where the data involved needs to be kept continuously and never deleted.
In the past before using Yii i have included in each table a ‘state’ column - 1:online, 2:deleted so when a user ‘deletes’ something all they are actually doing is changing the state to 2.
So if the database has this state column what do you think the best method of achieving this would be:
[indent][list=1]
[*]Redefine the delete method in a bespoke AR
[*]Add a new method changeState() to each controller