-
Notifications
You must be signed in to change notification settings - Fork 45
Error while initating pmt init
#52
Comments
Hi 👋 It looks like you used quotes ( |
No any problems sir Here is the log
|
Great for the quotes 👍 You are providing the following url: Prisma-multi-tenant currently uses the "one tenant = one database" model, which also requires another database for the management. (However, once #40 is implemented, you will be able to use the "one database = multiple tenants") |
i haven't even initiated the pmt . i currently using one schema at postgres2 db here is a photo here is the .env file
i have also tried now to remove the space from the directory |
You need to provide a different schema for the management. Example:
|
Still same cloned the public schema to managment schema as shown :- Log
|
You need an empty schema for the management. Prisma-multi-tenant will handle the schema itself using Prisma to create a table to handle your tenants. (Maybe I need to improve the documentation to better explain this) |
Yesss This solves the issue . one last question . how i can add tables in the managment schema ? |
Awesome! 😄 Prisma-multi-tenant currently "hides" the management prisma schema, so you would need to manually add tables in the management database. What would be your use case for this ? |
@Errorname I will tell you my questions regarding pmt and hopefully i can get answers i have a multi tenant application with prisma i need to use this tool to implement the multi-tenancy logic Now i have initiated a pmt via pmt init for example . if i have edited a foreign key in the managment schema |
Alright, so here is how Prisma-multi-tenant works: You have a management database (here the "management" postgresql schema). This management db is solely handled by Prisma-multi-tenant. It will only contain the references (name + url) to all of your tenants. You will also have other databases (=postgresql schema): one for each of your tenant. To create a new tenant, you simple have to call the So: 1 db for management + X databases for your tenants. When you want to migrate all of your tenant's databases at the same time, you can call I hope I was able to answer your questions 🙂 |
Yes this clarify it Thank you so much |
Hello , this my first time to use pmt and i cant initaite a pmt
i think there is a typo because the application trying to read from PMT_MANAGMENT_URL
while the created one is MANAGMENT_URL
The text was updated successfully, but these errors were encountered: