Tha case I faced was that I have a tracked nullable field. Now, I want to make that field non-nullable by setting "null=False" on the field. But there are some rows in events that contain null values and I don't want to change those rows. I needed the ability of a general setting to ingonre null=False on any field. I don't think any other constraints like "unique=True" are needed to be duplicated into event models either. The solution I came up with was overriding the field via the "attrs" argument of pghistory.track decorator I used on my model.
Tha case I faced was that I have a tracked nullable field. Now, I want to make that field non-nullable by setting "null=False" on the field. But there are some rows in events that contain null values and I don't want to change those rows. I needed the ability of a general setting to ingonre null=False on any field. I don't think any other constraints like "unique=True" are needed to be duplicated into event models either. The solution I came up with was overriding the field via the "attrs" argument of pghistory.track decorator I used on my model.