# What changed in django-pghistory

> 14 changes in django-pghistory 2 to 3 from its official release notes, upgrade guides and advisories: 5 breaking, 1 new APIs and options. Each one cited. Sources checked 2026-10-26. HTML: https://unstale.sh/pypi/django-pghistory/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## django-pghistory 3

### Breaking changes

- Transaction-altering statements are no longer tracked in context tracking. (3.9.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.0)
- Python 3.9 is no longer supported. (3.9.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.0)

### Fixes and other changes

- Fixes explicit condition overrides in RowEvent.__init__ that were unreliable. (3.9.2) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.2)
- Fixes explicit level overrides in RowEvent.__init__ that were unreliable. (3.9.2) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.2)
- Django 6.0 support was added. (3.9.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.0)
- Postgres 18 support was added. (3.9.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.0)
- Python 3.14 support was added. (3.9.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/releases/tag/3.9.0)

## django-pghistory 2

### Breaking changes

- Version 2 requires django-pgtrigger 4.5 or later to avoid possible migration-related bugs. (2.0.0) — [upgrade guide](https://django-pghistory.readthedocs.io/en/3.9.2/upgrading)
- When tracking third-party models, register trackers on proxy models; otherwise, trigger migrations are created outside the project. (2.0.0) — [upgrade guide](https://django-pghistory.readthedocs.io/en/3.9.2/upgrading)
- Setting this to True along with settings.PGTRIGGER_MIGRATIONS=False preserves the legacy behavior of how triggers were installed. (2.0.0) — [upgrade guide](https://django-pghistory.readthedocs.io/en/3.9.2/upgrading)

### New APIs and options

- Set this setting to False to disable django-pgtrigger integration with migrations entirely. (2.0.0) — [upgrade guide](https://django-pghistory.readthedocs.io/en/3.9.2/upgrading)

### Behavior and default changes

- 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. (2.0.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/blob/HEAD/CHANGELOG.md)
- django-pghistory no longer requires users to wrap settings.DATABASES with django-pgconnection. (2.0.0) — [release notes](https://github.com/AmbitionEng/django-pghistory/blob/HEAD/CHANGELOG.md)

### Tooling

- Run this command to create migrations for triggers when upgrading to version 2. (2.0.0) — [upgrade guide](https://django-pghistory.readthedocs.io/en/3.9.2/upgrading)
