citusdata / django-multitenant

Python/Django support for distributed multi-tenant databases like Postgres+Citus
MIT License
721 stars 119 forks source link

does this support MySQL?? #33

Closed heimagithub closed 5 years ago

heimagithub commented 5 years ago

My project database uses MySQL. I want to switch schemas dynamically. so can it support MySQL???

louiseGrandjonc commented 5 years ago

Hello @heimagithub,

I have never tested this project with MySQL. The goal is mainly to add AND tenant_id=X and change the join to be SELECT * FROM table_a JOIN table_b ON (table_a.id=table_b.a_id AND table_a.tenant_id=table_b.tenant_id), these queries being compatible with MySQL, I see no problem in terms of compatibility.

The only thing is that the database engine being based on the postgresql one, you should not change it like the documentation says :) It will work anyway

Let me know if you tried and if it works !