bernardopires / django-tenant-schemas

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

Handle the migration case while tenant model is not created yet #445

Closed ghost closed 7 years ago

ghost commented 7 years ago

The command manage.py migrate_schemas --shared crashed when database is still empty from any table and settings have an PG_EXTRA_SEARCH_PATHS variable.

bernardopires commented 7 years ago

Can you please make the error handling more elegant? Let's not do a blanket exception for ProgrammingError and let's make sure the user knows what's the problem.

ghost commented 7 years ago

@bernardopires Feel free to rewrite it as you desire. Although I were happy to handle that if it was requested one month ago or so, I am no longer developing that project and the above fix was enough for me.