[sqlalchemy] Re: Database with audit trail table
On Saturday 22 August 2009 01.08:05 David Bolen wrote: Adrian von Bidder avbid...@fortytwo.ch writes: Ideas comments? For what it's worth, I'd think that the best sort of audit would be something done in the database itself, since it would audit any changes whether done through any interface. Yes and no... I see your point (and since I know pg better than sqla/python I'd probably even be quicker doing it in SQL), but the application has more knowledge about what's going on. My audit table should not just version the db content, but I plan to record additional stuff that comes from the application (like: who authorized the change? etc.) which is not readily available at the db level. (And then there's the fact that I'm writing this toy project to learn about sqlalchemy, so going ahead and writing an SQL audit trail framework misses this goal completely :-) cheers -- vbi (Off to play around with SeesionExtension some more ...) -- featured link: http://www.pool.ntp.org signature.asc Description: This is a digitally signed message part.
[sqlalchemy] Re: Database with audit trail table
You might want to start here http://www.sqlalchemy.org/trac/wiki/UsageRecipes/LogVersions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: Database with audit trail table
Adrian von Bidder avbid...@fortytwo.ch writes: Ideas comments? For what it's worth, I'd think that the best sort of audit would be something done in the database itself, since it would audit any changes whether done through any interface. It depends on the database involved, but for example, in PostgreSQL you could establish audit rules on the relevant tables that copied old row values into a mirror audit table whenever they changed. You can put the audit tables off in a different schema (which also lets you keep the same table names) to avoid them being visible by default to normal users/applications in the database. -- David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---