bernardopires / django-tenant-schemas

Tenant support for Django using PostgreSQL schemas.
https://django-tenant-schemas.readthedocs.org/en/latest/
MIT License
1.46k stars 424 forks source link

Can't migrate new tables to tennant apps. #668

Open gregocanepa opened 3 years ago

gregocanepa commented 3 years ago

Hi! I'm trying to add a new model called ExternalContactId to one of my tenant schemas but when I run the migrate_schemas command, I get the following error:

psycopg2.errors.DuplicateTable: relation "dashboard_strategy_numerical_filter" already exists

django.db.utils.ProgrammingError: relation "dashboard_strategy_numerical_filter" already exists

This error points to a table that has already been created in the tenant schema, how can I tell django to bypass tables that already exist and only create the new tables?

Please tell me if you need more details to understand the issue, I'm it has happened to more than a few people. Cheers.