citusdata / django-multitenant

Python/Django support for distributed multi-tenant databases like Postgres+Citus
MIT License
710 stars 116 forks source link

Disable create column inline fk #95

Closed danlls closed 2 years ago

danlls commented 3 years ago

Django 3.0 postgresql backend now attempts to create ForeignKey constraints without going through self._create_fk_sql that is overwritten by this package to construct the constraint https://github.com/django/django/blob/3.0.10/django/db/backends/base/schema.py#L461 https://github.com/django/django/blob/a208020ecd0aa568cb5be6ef8b76701224ebe1a2/django/db/backends/postgresql/schema.py#L24

This causes error in https://github.com/citusdata/django-multitenant/issues/94

Fixes #94

JelteF commented 2 years ago

Thanks for the contribution, sorry for leaving it open for so long.