-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to django-pghistory 3.4.0 #4441
Conversation
quevon24
commented
Sep 10, 2024
•
edited
Loading
edited
- Update django-pghistory version in pyproject.toml and poetry.lock
- Update all @pghistory.track decorators in models to use the features of new library version
- Removed custom django-pghistory tracker, it is deprecated.
- Migrations for production (migrations only contain triggers)
- Update tests
Update all @pghistory.track decorators Migrations for production
Did you see the setting that's now possible to set a default tracker? |
Yes, i was thinking that maybe we could use the PGHISTORY_DEFAULT_TRACKERS for the models like Docket, OpinionCluster, etc and leave the custom decorators for m2m relationships like DocketTags, DocketPanel, etc. Also should that setting go in the third_party directory or since it is so small should it go in django.py file? It should look like this: PGHISTORY_DEFAULT_TRACKERS = (
pghistory.UpdateEvent(
condition=pghistory.AnyChange(exclude_auto=True), row=pghistory.Old
),
pghistory.DeleteEvent(),
) |
…tory-30 # Conflicts: # poetry.lock
…tory-30 # Conflicts: # poetry.lock
@mlissner I reviewed this in detail, and it works properly after the update. Just a couple of comments:
|
No, this is good to go! We don't need SQL files since we don't need to apply those trigger changes to either our replica or customer replicas. There are some |
Wonderful. I'll merge and, @quevon24, if you can create a deployment issue for Ramiro, that'd be great. |
Merged. Thanks everybody! |