rvinzent / django-dynamic-models

Dynamic Django models allow users to define, edit, and populate their own database schema.
MIT License
158 stars 47 forks source link

Add setting constraints while in transaction to silence OperationalError #41

Closed wieczorek1990 closed 3 years ago

wieczorek1990 commented 3 years ago

This resolves errors like:

django.db.utils.OperationalError: cannot ALTER TABLE "table_prefix_table_name" because it has pending trigger events

which happen in this scenario:

alter table
insert
alter table
insert