Israel Santos
Israel Santos
PPrisma
Created by Israel Santos on 11/16/2024 in #help-and-questions
Dynamic Database Name Support in Studio
I’m facing a recurring issue during development that forces me to duplicate projects just to manage different .env files. Let me explain the scenario: Currently, I’m working on a project with a MASTER database that handles tenant access and several TENANT_###### databases, each specific to a client. Here’s the workflow: 1 - I connect to the URL (example): localhost:5432/MASTER to access the master database. 2 - I find the client’s number (e.g., 50). 3 - Then, I have to close Studio, switch the .env file from MASTER to TENANT_000050, and reopen Studio. This process complicates development significantly. To keep things running smoothly, I currently duplicate the project just so both the MASTER and one TENANT can stay online simultaneously, which is far from ideal. Suggestion: Would it be possible to create a script or feature that allows passing dynamic arguments, like -d TENANT_000050, when starting Studio? Note: I’m considering making a fork or opening a PR to implement this directly in the Studio interface. I think having an input field to dynamically change the database name via the browser would be a fantastic productivity booster. What do you think? Is there any existing solution or idea for this?
1 replies