Comments (1)
I've started adding django-pghistory
to the project and I've also encountered this behaviour where PGHISTORY_DEFAULT_TRACKERS = (pghistory.InsertEvent(), pghistory.UpdateEvent(), pghistory.DeleteEvent())
and @pghistory.track(pghistory.InsertEvent(), pghistory.UpdateEvent(), pghistory.DeleteEvent())
does not behave the same. The former errors out with the same message as in description.
My first assumption was that it errors out on fields with foreign key where the name does not equal db_column, ie store_rep = models.ForeignKey(Store, db_column='store_id', on_delete=models.PROTECT)
.
- PSQL v14
- Django==4.2.7
- psycopg2==2.9.6
- django-pghistory~=3.1.0
from django-pghistory.
Related Issues (20)
- trigger condition based on pghistory context
- update primary key data type on tracking tables
- [Question] how do you get django to recognize the dynamically created Event Models during makemigrations?
- Docs for 3.0.1 didn't build
- Migration error when collecting context with management command
- Tracking different fields depending on event
- minor: docstrings mention DatabaseTracker, which was removed
- ProgrammingError caused by _pgh_attach_context from create_event when using denormalized context
- How to ignore/disable eventing dynamically ? HOT 1
- pghistory.context used when pghistory.middleware.HistoryMiddleware throws AttributeError: 'NoneType' object has no attribute 'nextset'
- Issues upgrading from 2.8.0 to 3.1.0 HOT 2
- Disable during test runs HOT 2
- Logging changes to django-pydantic-field model fields HOT 1
- Events queryset fails for custom model PKs
- MiddlewareEvents model should allow nullable context
- Is there a way to delete all Events?
- Admin for MiddlewareEvents doesn't display non-mw events
- Configurable Event Model Suffix HOT 1
- django.db.utils.ProgrammingError: relation "pghistory_context" already exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-pghistory.