-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Feature Request
Description:
Add support for multi-tenancy, allowing materialized views to be scoped to a specific tenant (e.g., by a schema name or a tenant ID column).
Use Case:
In SaaS applications, data is often partitioned by tenant. This feature would allow the gem to manage materialized views within each tenant's namespace or schema correctly.
Proposed Solution:
- Allow an optional
tenant_idorschema_nameto be associated with aMatViewDefinition. - All operations (refreshing, querying) must be performed within the context of the correct tenant.
- This may involve using
Apartmentor similar gems, or settingsearch_pathin PostgreSQL.
RSpec Tests:
- Set up two tenants (e.g., two schemas).
- Create a view definition with the same name in each tenant.
- Trigger a refresh for the view in tenant 1.
- Verify that the view in tenant 1 is refreshed, but the view in tenant 2 is not.
Checklist:
- I have searched for a similar feature request and didn't find any duplicates.
- I have included all the required information.
- I have tagged the issue with the label "enhancement".
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog