bernardopires / django-tenant-schemas

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

User within tenant app #643

Closed ratondeau closed 4 years ago

ratondeau commented 4 years ago

I have problems to get my project with tenant-schemas working. I have an extra app with the Client model and my application for the different clients. Tha data of this application should be the tennant app. It also contains the user model which extends the abstract user (auth/AbstractUser). So I cannot put this application in shared apps. But if it is not in shared apps I get an error if I try to migrate schema (relation my_app_user does nor exist). I do not want to have the user data in the public scheme, but is this even possible. What could I do to get around this?

ratondeau commented 4 years ago

This is working if I add my app and the admin (which causes the error) to shared and tenant apps. So I have the users in public shema but also in each tenant schema and they are divided properly.