Automagically log changes in table
aspineux at gmail.com
Sun Mar 18 00:59:36 CET 2007
You can get this using "triggers" and "stored procedures".
These are SQL engine dependent! This is available for long time with
postgress and only from version 5 with mysql.
This let you write SQL code (Procedure) that will be called when
"trigged" by an event like inserting new row, updating rows,
On 17 mar, 21:43, "George Sakkis" <george.sak... at gmail.com> wrote:
> This is more in the context of Turbogears/SQLAlchemy, but if anyone
> has implemented something similar with other packages it might be
> useful to know.
> I'd like to have a way to make a table "loggable", meaning it would
> get, say, two fields "last_modified" and "modified_by", and every
> write operation on it would automatically record the time and the id
> of the user who did the addition or change (I'm not sure how to deal
> with deletions let's leave this for now). Has anyone done something
> like that or knows where to start from ?
More information about the Python-list