Implementing Dual-Write for User/Tenant Data Separation
Introduction
Our application initially stored user-specific data directly within the Tenant model. As we've grown, the need for a more scalable and maintainable solution became apparent. To address this, we embarked on a project to separate user profiles into a dedicated table within each tenant's schema.
The Challenge
Storing user data directly in the Tenant model created several