-
Epic
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
enforce db service ownership
-
False
-
-
False
-
To Do
-
100% To Do, 0% In Progress, 0% Done
What We Need to Do: We will refactor our shared PostgreSQL database to assign dedicated schemas and database roles (users) to each service. This involves creating new schemas and roles, migrating existing service-specific tables into their new respective schemas, and configuring each service to connect using its own dedicated role and default schema. We will revoke default CREATE privileges on the public schema.
Why We Should Do It: Currently, all services share the same database and user, leading to blurred ownership and a high risk of accidental cross-service data interactions or schema conflicts. This initiative directly supports our Service-Oriented Architecture (SOA) principles by enforcing strict separation of concerns at the database level. It will prevent naming collisions, clarify data ownership, and reduce coupling between services.
What Benefit We Get From It: This effort will provide clear data ownership for each service, enabling independent schema evolution and reducing the "blast radius" of database changes. It will simplify testing, improve deployment confidence, and significantly reduce the risk of unintended side effects from database interactions, ultimately leading to a more robust, maintainable, and scalable architecture.
https://docs.google.com/document/d/13EPptVE77ygwbSjxVWJfBPFmromFaOys4x2lOdF5uzc/edit
- is related to
-
SWATCH-3680 SPIKE: Evaluate large table migration pattern and explore alternatives
-
- Backlog
-