Skip to content

Make AUDITLOG_LOGENTRY_MODEL swappable#805

Open
Jackevansevo wants to merge 1 commit intojazzband:masterfrom
Jackevansevo:master
Open

Make AUDITLOG_LOGENTRY_MODEL swappable#805
Jackevansevo wants to merge 1 commit intojazzband:masterfrom
Jackevansevo:master

Conversation

@Jackevansevo
Copy link

Fixes #804

See issue description:

Prevents a dangling auditlog_logentry from conflicting with the flush management command.

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.33%. Comparing base (3f255a0) to head (b0c7600).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #805   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files          35       35           
  Lines        1256     1256           
=======================================
  Hits         1210     1210           
  Misses         46       46           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hramezani hramezani requested a review from 2ykwang February 24, 2026 11:57
@2ykwang
Copy link
Member

2ykwang commented Feb 27, 2026

Thanks @Jackevansevo for the PR! Looks like fresh installs are covered now.
do we also need to address existing users who already have an auditlog_logentry table?`

@Jackevansevo
Copy link
Author

Jackevansevo commented Mar 3, 2026

Thanks @Jackevansevo for the PR! Looks like fresh installs are covered now. do we also need to address existing users who already have an auditlog_logentry table?`

Is a good point.

I think our choices are either:

  1. Attempt to delete / cleanup auditlog_logentry in apps where AbstractLogEntry is used
  2. Do nothing

I was learning towards 2.

  • Less risk / easier to review/test

  • If users haven't been hit/effected by the behaviour until now their experience doesn't change.

  • I imagine a lot of people effected would have generated their own one-off migrations to work around this anyway. We could advise/recommend this in the docs/release notes.

If I get a steer from a maintainer I'm happy to look at doing 1. and get this across the finish line.

I'd probably want some safety checks around the migration (i.e. only drop the table if there's no records present), to avoid a situation where upgrading the package inadvertently wipes data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting AUDITLOG_LOGENTRY_MODEL leaves a dangling auditlog_logentry table, breaking flush

2 participants