If I make a change to a TenantForeignKey that requires an AlterField operation (e.g. change the related_name, the migration that's created will try and recreate the constraint that already exists and fail with the following error.
django.db.utils.ProgrammingError: constraint "core_order_customer_id_brand_id_c6c43641_fk_core_cust" for relation "core_order" already exists
The fix for https://github.com/citusdata/django-multitenant/blob/master/django_multitenant/backends/postgresql/base.py#L37 introduced a new issue.
If I make a change to a
TenantForeignKey
that requires anAlterField
operation (e.g. change the related_name, the migration that's created will try and recreate the constraint that already exists and fail with the following error.