Monday, January 23, 2017

Re: audit trail functionality in database model

Django Field History is a great project to audit trail a model field

On Saturday, January 21, 2017 at 7:19:57 AM UTC-5, enrico baranski wrote:
Hi all Django users,

I'm quite new to Django and currently experimenting with the database model. Defining fields appears to be quite intuitive and is well described in the documentation. However, I am looking into audit trail functionalities. What that means to me. I have two tables, one is my master data table (rooms) and one is my audit trail table for the rooms table.

So I aim on two major things, first I would like to increment a field "version" in my room-table to track any change on the table record. Inserting the record means version=1 and as soon as the record is changed the field version should increment to 2 and so on.

Second thing would be to automatically track the changes from one version to another in my audit trail table. So I am looking for a way to automatically make table entries when I update the main table ...

My final goal is to define the audit trail functionalities in the database models so it is forced on any record manipulation.

I hope I could describe my issues comprehensible and would be very happy to get some feedback from you guys.


Thanks a lot and best regards,
enrico

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e374c953-17bf-47ae-b74e-34766910dc1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment