pypi / django-pghistory
django-pghistory
What changed in django-pghistory 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
5 breaking1 new APIs and options2 behavior and defaults1 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdjango-pghistory 37 changes
Breaking changes 2
Transaction-altering statements are no longer tracked in context tracking.
Python 3.9 is no longer supported.
Fixes and other changes 5
Fixes explicit condition overrides in RowEvent.__init__ that were unreliable.
Fixes explicit level overrides in RowEvent.__init__ that were unreliable.
Django 6.0 support was added.
Postgres 18 support was added.
Python 3.14 support was added.
django-pghistory 27 changes
Breaking changes 3
Version 2 requires django-pgtrigger 4.5 or later to avoid possible migration-related bugs.
When tracking third-party models, register trackers on proxy models; otherwise, trigger migrations are created outside the project.
Setting this to True along with settings.PGTRIGGER_MIGRATIONS=False preserves the legacy behavior of how triggers were installed.
New APIs and options 1
Set this setting to False to disable django-pgtrigger integration with migrations entirely.
Behavior and default changes 2
Triggers created by django-pghistory now integrate with Django migrations. Run python manage.py makemigrations to upgrade; register trackers for third-party models on a proxy model so migrations are created in the proper app.
django-pghistory no longer requires users to wrap settings.DATABASES with django-pgconnection.
Tooling 1
Run this command to create migrations for triggers when upgrading to version 2.