On 26 October 2010 19:05, Steve Holden <holden...@gmail.com> wrote:
> On 10/26/2010 12:40 PM, Phlip wrote:
>> Note that "isabelle_item" appears twice. We are following the auditing
>> rule "always write new records to change data - never edit previous
>> records". Someone edited isabelle_item's payload data (not shown), so
>> we add a new record without touching the existing record.
>
> I hope the auditors are only forcing you to do this with records that
> aren't referenced as part of relationships, otherwise your database is
> going to get hammered updating all the foreign keys.
>
> Wouldn't it make more sense (not that auditors will necessarily be
> persuaded by sensible arguments) to dump a copy of a row (plus possibly
> a timestamp field) to an archival table before update? This coild easily
> be done on a pre-save signal ...

This sounds like what django-reversion[1] does :)

[1]: http://github.com/etianen/django-reversion#readme

-- 
Łukasz Rekucki

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

Reply via email to