massive
massive copied to clipboard
Multi tenant dynamic connections
Is it possible to create multi tenant connections (1 DB per tenant) using this package?
I store my tenant connection details in a master database. So I need one master connection on boot.
When a request is made to the app, grabbing the tenant ID either from header or authenticated user and looking up the tenant connection details putting them in a map. Next request looks into the map for the connection details with tenant id as key.
But how would you create a connection dynamically on every request like this?