Yii Framework Forum: Versioning the updates of dB Records - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Versioning the updates of dB Records Rate Topic: -----

#1 User is offline   Geo99M6Z 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 22-September 11

Posted 22 September 2011 - 12:45 PM

I am totally new to Yii and PHP frameworks in general. I love it because I don't have to write the basic code. ;D

However, a current system that I have created I added a feature that will store a "version" of a dB record into a separate table "_versioning" that contains a version number of the update and what the record contained before a user updated the contents.

After some searching I could not find anything that would do this in Yii, maybe I'm just searching for the wrong term.

To explain further:

a) user adds FirstName, LastName, Address, etc stored in ADDRESS table
B) user updates Address 
     i) store old info in "ADDRESS_versioning" table
    ii) save as version 1 [current table has v1] 
   iii) update "version number" before saving into current table as v2
c) new updates reside in ADDRESS table.


Is there something within the Yii framework to do this automatically?
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,349
  • Joined: 12-October 09
  • Location:Croatia

Posted 22 September 2011 - 02:36 PM

Check this extension - http://www.yiiframew...actsasversioned
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   Geo99M6Z 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 22-September 11

Posted 23 September 2011 - 12:49 PM

View Postmdomba, on 22 September 2011 - 02:36 PM, said:


Thanks for the reply!

That is what I was looking for. I'm not really sure why I didn't browse the extensions for this.
0

#4 User is offline   yep 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 17-October 12

Posted 17 October 2012 - 05:59 PM

I noticed in your suggested example above, you were looking to add an _versioning table for each table in the db. The eactsasversioned extention versions all records inside of the same table rather than adding an additional table for versioning. With this approach the table can get huge very quickly and over the course of a couple of years the app could run into performance issues. Is there an extention or way to extend the eactsasversioned extention to work with separate tables for versioning? How are other people versioning their table records?
0

#5 User is offline   jeanluca 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 59
  • Joined: 22-January 11
  • Location:Bunnik, Netherlands

Posted 19 November 2012 - 04:49 PM

View Postyep, on 17 October 2012 - 05:59 PM, said:

I noticed in your suggested example above, you were looking to add an _versioning table for each table in the db. The eactsasversioned extention versions all records inside of the same table rather than adding an additional table for versioning. With this approach the table can get huge very quickly and over the course of a couple of years the app could run into performance issues. Is there an extention or way to extend the eactsasversioned extention to work with separate tables for versioning? How are other people versioning their table records?


Very interesting point. As soon as I have time I will look into this issue!

Cheers
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users