Prisma1: Multi Tenant Isolated Databases

Created on 18 Jul 2018  路  2Comments  路  Source: prisma/prisma1

Is your feature request related to a problem? Please describe.
I'm building a multi tenant application for car dealerships. The structure is like Intercom -- Intercom has customers (businesses) and those businesses have users.

Describe the solution you'd like
The app handles sensitive data and the infrastructure is critical to the respective businesses. I want to split the databases on a per business (tenant) use for data security and product stability, e.g. individualized rollbacks.

Describe alternatives you've considered
I'm currently using a single database with a tenant ID to separate data.

Additional context
Another approach is isolating tenants per schema, e.g. https://github.com/influitive/apartment

That looks like the approach taken in the docs, but it's not clear how it works. The relevant "how to configure your database" link doesn't specify how to hook up multi-tenancy. https://www.prisma.io/docs/reference/prisma-servers-and-dbs/database-connectors/overview-eiw6ahgiet/

That helps the data isolation problem, but isn't particularly useful for rollbacks and stability because noisy tenants can still disrupt others.

kinfeature areengine

Most helpful comment

Any news on this ?

Is it possible to make something like this ?

All 2 comments

Any news on this ?

Is it possible to make something like this ?

When I enable multitenancy only thing I get was a new DB schema for each project. However, I need to specify a new DB connection.
This information is old because it belongs to an old version. But, it is also vague.
https://www.prisma.io/docs/reference/prisma-servers-and-dbs/database-connectors/overview-eiw6ahgiet/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sedubois picture sedubois  路  3Comments

notrab picture notrab  路  3Comments

hoodsy picture hoodsy  路  3Comments

dohomi picture dohomi  路  3Comments

MitkoTschimev picture MitkoTschimev  路  3Comments