django-pgtrigger
django-pgtrigger copied to clipboard
can't create Constraint Trigger
I can't create CONSTRAINT TRIGGER and also set DEFERRABLE INITIALLY DEFERRED settings.
Did you read this section of the docs on how to do this? Or did you try it and receive an error?
Deferrable constraint triggers are configured by setting the timing argument of the trigger. For example:
class MyModel(Model):
class Meta:
triggers = [
pgtrigger.Trigger(name="constraint_trigger", timing=pgtrigger.Deferred, ...)
]
Going to close this since I believe it's been answered. Feel free to re-open you're still having issues