django-db-multitenant
django-db-multitenant copied to clipboard
Per database management command execution
I have a working installation of django-db-multitenant, its perfect for my use case thanks.
However, I cannot get the management commands to work, such as: TENANT_DATABASE_NAME=example.com ./manage.py migrate
How do I call such a command from a venv in Windows 10 Python installation?
Also, do you have a solution for looping the migration commands over multiple databases in MySQL (like database names app_bqt, app_cre, app_trb etc) ?
@LukeyJohnson Have a look at the update_from_env
function found in utils.py and related documentation in the README.
Please be aware that I have an open PR to fix an issue there related to how the utils code interacts with Django's cache (in case you're using it).
Hi guys,
I have taken a look at this, but am struggling to see how I would create a new tennant using this method, could an example of a new tennant be created.
thanks