Releases: Opus10/django-pghistory
3.5.0
Features
- Optimized
Events
diff queries by ~100x via a subquery instead ofLAG
windows by @lokhman in #173. - Optimized object-level
Events
queries in the django admin by avoidingUNION
queries by @lokhman in #174.
Changes
- Added Python 3.13 support, dropped Python 3.8. Added Postgres17 support by @wesleykendall in #175.
- Make
EventQuerySet
Generic for better typing by @max-muoto in #170
3.4.4
3.4.3
3.4.2
Fixes
- Fix using
@pghistory.track()
on models that have concrete inheritance by @wesleykendall in #164.
3.4.1
Fixes
- The
related_query_name
setting for tracked foreign keys had the default value mistakenly changed in v3.4.0. Fixed by @wesleykendall in #163.
3.4.0
Features
-
Make context middleware extensible by @wesleykendall in #141.
Inherit
pghistory.context.HistoryMiddleware
and overrideget_context
to add additional context data for every request. -
Support offline documentation formats by @wesleykendall in #144.
PDF versions of documentation are built via ReadTheDocs.
Fixes
- Check that the execute result is not
None
before trying to accessexecute_result.nextset()
by @wesleykendall in #156. - Ensure
pghistory.create_event
works when using denormalized context by @wesleykendall in #154. - More accurate type hints for the public interface by @wesleykendall in #143.
- Fix minor docstring issue in
pghistory.create_event_model
by @wesleykendall in #148.
Documentation
- Clean up configuration section of docs, ensure all settings are documented by @wesleykendall in #142.
- Modify conditional tracking examples by @wesleykendall in #145.
- Add section to FAQ on backfilling data by @wesleykendall in #146.
- Adjust guide on tracking management commands by @wesleykendall in #150.
- Note the Q/A discussions in the FAQ by @wesleykendall in #152.
3.3.0
Features
PGHISTORY_INSTALL_CONTEXT_FUNC_ON_MIGRATE
setting to configure installation of tracking function after migrations by @wesleykendall in #140.PGHISTORY_CREATED_AT_FUNCTION
setting to configure the function for determining the current time in history triggers by @lokhman in #137.- Add ASGI support by @pablogadhi in #127.
Fixes
-
Ensure
BigAutoField
s are properly mirrored in history models by @tobiasmcnulty in #134.Warning If you have event models for models with
BigAutoField
primary keys, you will see new migrations to convertpgh_obj_id
to a bigint. -
Support filtering event models by referenced proxy models by @lokhman in #135.
-
Ensure
bytes
representations of SQL are handled by @tobiasmcnulty in #136. -
Fix setting default trackers with the
PGHISTORY_DEFAULT_TRACKERS
setting by @SupImDos in #133. -
Don't install pghistory's context tracking function on non-postgres databases by @pmdevita in #132.
-
Ensure
MiddlewareEvents
doesn't filter out non-middleware events in the admin by @lokhman in #130. -
Support custom primary keys for the aggregate
Events
proxy model by @lokhman in #128. -
Fix type hints for
pghistory.track
by @SebastianDix in #118.
Changes
- Django 5.1 compatibility, dropped Django 3.2 / Postgres 12 support by @wesleykendall in #139.
- Added section in FAQ for handling issues with concrete inheritance by @xaitec in #138.
- Add reference to DjangoCon talk in the docs by @max-muoto in #114.