Make AUDITLOG_LOGENTRY_MODEL swappable - #805
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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 Harness. 🚀 New features to boost your workflow:
|
|
Thanks @Jackevansevo for the PR! Looks like fresh installs are covered now. |
Is a good point. I think our choices are either:
I was learning towards 2.
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. |
|
I'm having the same issue. Any chance this will be merged? |
2ykwang
left a comment
There was a problem hiding this comment.
@Jackevansevo sorry for the delayed response.
I tested the scenarios below, and everything works as expected:
| Setup | Result |
|---|---|
| Existing + default model | No changes |
| New + default model | Default table is created |
| New + custom model | Only the custom table is created; flush succeeds |
| Existing + custom model | Existing default table remains |
I agree with 2.
Could you also add an entry to CHANGELOG.md for this change?
Thanks again for your contribution!
Fixes #804
See issue description:
Prevents a dangling
auditlog_logentryfrom conflicting with the flush management command.