Tracking Revisions

6 views
Skip to first unread message

Steve Bryant

unread,
Jun 23, 2011, 12:47:35 PM6/23/11
to DataMgr
I have been thinking about a new feature for DataMgr for a while and
wanted to see if any smart people had any thoughts on how it should
work (or if it makes sense).

I want to be able to keep track of every revision made on a table.
This would be useful for logging as well as for reverting to a
previous state for a record.

I am thinking that it would have an optional "versions" attribute in
the XML and an optional method to tell DataMgr to use versioning on a
table if you aren't using loadXml(). You could also optionally tell it
the name of the table in which DataMgr should store the revision
information.

Then it would create a new record in this table every time that you
add or edit a record.

Assuming that all makes sense, does it make sense to also add
method(s) to help restore a record to its previous state? What about
method(s) to see all of the revisions made on a table?

What about an initialization method that tells DataMgr to track
revisions on all tables?

Any thoughts?

Tim DeMoss

unread,
Jul 11, 2011, 1:55:44 PM7/11/11
to dat...@googlegroups.com
I like every one of these ideas. Especially since this continues to be a request from clients. Right now, I can think of a few other flourishes it might be nice to see.

Limit the number of records to keep DB size under control. Perhaps there could be more than one way to set the limit:
  • Keep for X days/weeks/months/years
  • Keep only the last X records
Regarding viewing all revisions for a table, it would be nice to be able to pass in some filters on that. For example, only show me revisions where field X meets criterion Y. That would be useful when viewing revisions to a particular record (filter by ID).

In addition to restoration to previous state, how about restore to a particular state regardless of whether it was the immediately previous one? If one was viewing all revisions to RecordID = X, then perhaps you could choose (via radio button?) the version you wish to restore.

Will pass along other thoughts as they occur to me.

tdm

Tim DeMoss
303-747-5610

"Having received a human life, do not waste the passing moments."
         -- Dogen Zenji



--
You received this message because you are subscribed to the Google Groups "DataMgr" group.
To post to this group, send email to dat...@googlegroups.com.
To unsubscribe from this group, send email to datamgr+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/datamgr?hl=en.


Steve Bryant

unread,
Jul 12, 2011, 9:36:01 AM7/12/11
to dat...@googlegroups.com
I hadn't thought about limiting the amount of data in the revisions
table(s). On one hand, that should be easy to add an attribute to
specify that. On the other hand, I am not sure when the deletions
should take place. I suppose it would have to run a delete SQL
statement every time that it added a record (or at least check if one
should be run every time). I think it could track the last time it did
it and only run the SQL if it hadn't been run in X # of inserts or X #
of day (depending on whether the limit was in time or in records).

Yeah, I was definitely thinking that restoring should be to a specific
revision and not necessarily just to the previous state.

I *think* it should be easy to have DataMgr retrieve records from a
revisions table just like it would from a normal one. I'm not sure if
it should be allowed to modify it directly, however.

Thanks,

Steve

Reply all
Reply to author
Forward
0 new messages