Hi guys, first of all I’m really impressed with the flexibily of Yii… after working for over 2 years in Cake, feeling of freedom is great
My question is, has anybody written history/revsion behaviour? Something like http://www.yiiframew…k/19/revisions/ ?
Idea with generating mirror table for each model isn't so great in my opinion…
I've thought about several behaviours to write but its mostly on a 'I code them when I need them' basis. Versioning is one of those behaviours.
My thoughts went to creating a separate versioning table for each model as it's easiest in my view. It creates no hassle with current relationships and is best for performance. If you have any other suggestions, I'd like to hear them.
Yup, separate table for each model seems to be the easiest way to solve this functionality… I just don't like having many tables for having same feature.
My first idea without creating many tables, was to create one table 'revisions' with fields like id,rev_id,model,model_id, create_date.
Rev_id - revision number of concrete model
Model - each model would be saved into model field with serialize().
Such solution, would be flexible and quite easier to implement.
What do u think?