How to run migrations for a specific tenant/schema in Django multi-tenant framework?

Viewed 67

The tenant_command was not working properly according to my requirements. So, I found out this solution after tweaking the command below

python3 manage.py tenant_command migrate --schema=schema_name
1 Answers

To run a migration for a specific tenant we just need to specify schema_name for the tenant after the command migrate like --schema=schemaname

python3 manage.py migrate --schema=schema_name
Related