I usually have a timestamp column in my MySQL tables like this:
changeTime TIMESTAMP NOT NULL
which implicitely declares the column in MySQL with this attributes:
changeTime TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
That means i can update every entry in that table and leave away the changeTime column. It will always be automatically updated to the time of last change. This works even though the column is declared as NOT NULL. MySQL takes care of everything.
With Yii's ActiveRecords i can remove the required rule for that column - that's great. I can create and save a record with NULL in the changeTime attribute and it will have the changeTime set correctly.
But when i load an existing record and save it again, the old value will remain. I have to set changeTime to either null or the current date. Wouldn't it be convenient to somehow declare this column as an autoupdated timestamp column that's set to NULL on every save()?