Closed ystekno closed 2 years ago
For the orm part, for now it's not possible to specify the schema
for postgres. If it was possible, then you would need to
parse the url to find the name of the schema. And then get the query builder instance by passing the schema to it.
I'll take a look into this issue. It is important to be able to set the tenant at the query level. Even globally so you can modify it on each request (which might need a middleware for that?)
This is a great feature
@goophps If we add this feature in postgress, then we have to find similar approach for other databases as well and I think it needs some time to be fixed. Till then here's the package implementation: https://github.com/py-package/masonite-multitenancy
This request should use this package https://github.com/py-package/masonite-multitenancy
Is your feature request related to a problem?
Is it possible to connect single database to different schemas in postgresql with different http subfolder like django-tenants?
What do we currently have to do now?
No response
Describe the solution you'd like
For example, there are two tenants named demo and apple: http://localhost:8000//helloworld -> http://localhost:8000/demo/helloworld
http://localhost:8000//helloworld -> http://localhost:8000/apple/helloworld
Describe alternatives you've considered
No response
Would this be a breaking change ?
Anything else ?
No response