-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Right now, required session fields (session_id
, session_date
, potentially user_id
, etc.) need to be provided when starting a history session, otherwise the triggers will fail. This was by design, so triggers fail loudly without context. However, there are applications with substantial "external" database operations (Django management commands, custom SQL, etc.) that are difficult or impossible to wrap in a history session. For instance, running custom SQL on an SQLite database (where you can't create the necessary user-defined functions in SQL yourself), or using a management command from a third-party Django package.
It would be nice to have a way to specify trigger-level default values for fields. It should be off by default, and the pitfalls of silently recording these defaults should be documented, but it should at least be possible.
It would also be nice to have a way to hook into all manage.py commands, but this will be a separate issue as it will require a PR to Django itself.