On Jul 28, 2009, at 7:56 PM, Lukasz Szybalski wrote:

>
> Hello,
>
> I want to implement a change log table something similar to
> ticket_change table in trac.
>
> ticket_change table structure:
>
> Primary key (ticket, time, field)
> Index (ticket, time)
>
> ticket  integer  (fk to my table "ticket")
> time inetger
> author
> field
> oldvalue
> newvalue
>
>
> How can I plugin my sqlalchemy connection / setup so that when it
> tries to save changes to some table (in this case ticket) it saves the
> old and new value for that field.
>
> Where during the sqlalchemy can I plug it in?

MapperExtension.before_insert() is best, assuming the data you're  
manipulating is within a single object (i.e. not any related objects).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to