django-auditlog icon indicating copy to clipboard operation
django-auditlog copied to clipboard

django-auditlog not storing data changes of tables existing in a separate database.

Open sonalidebbarma17 opened this issue 5 years ago • 1 comments

I tried to record the audit logs for a table existing in a separate database but the logs were not reflected in the auditlog_logentry table. Is there any way which can record the audit logs of tables existing in multiple/separate databases?

sonalidebbarma17 avatar Oct 08 '20 12:10 sonalidebbarma17

We have this issue as well :) We can use a router to move the auditlog app logs to the other database, but it hangs up on trying to reference on of the base django tables. django.db.utils.IntegrityError: insert or update on table "auditlog_logentry" violates foreign key constraint "auditlog_logentry_content_type_id_75830218_fk_django_co" DETAIL: Key (content_type_id)=(31) is not present in table "django_content_type".

JSAustin avatar Jan 20 '21 00:01 JSAustin