Anaphory
Anaphory

Reputation: 6400

Log only database-changing queries

Is there a way to tell sqlalchemy to log queries, but only those that change the state of the database (in particular INSERT, UPDATE and DELETE)?

I would like to keep a tally of all the changes made to the content of a mostly static database, but I do not want every web access to it be logged.

Upvotes: 0

Views: 65

Answers (1)

SumanKalyan
SumanKalyan

Reputation: 1761

You can use SQLAlchemy-Continuum for this..its pretty cool...see the documentation to use - https://sqlalchemy-continuum.readthedocs.io/en/latest/

You can track all modification of your database with this.

Upvotes: 1

Related Questions