SQLAlchemy audit logging; how to handle deletes?
问题 I'm using a modified version of the versioning code example that comes with SQLAlchemy to record a user id and date on changes. However, I also want to modify it so deletes are done by marking a is_deleted type flag instead of running an actual SQL DELETE . My problem is I'm not sure how to capture the delete and replace it with an update. Here's what I have so far: ''' http://docs.sqlalchemy.org/en/rel_0_8/orm/examples.html?highlight=versioning#versioned-objects ''' from sqlalchemy.ext