Dilemma: I am working in microservices (MS) architecture for a product with shared (PostgreSQL) DB between MSes and DB Views exposed as Data Access API between SW Components, written and maintained by different teams in different languages (Java+Hibernate, C#, Python).
I have tables/views like root with columns id, name, type, is_deleted (a parent table for almost all entities in a System) and tables like child1 with columns id, ssn, birthday, child2 with columns id, mac, ip, system_uuid, child3 with columns id, sw_type, sw_version, system_uuid.
Column "system_uuid" is present almost for all children entities and is meaningful for all entities in the system (where not present - some default value is used) and I need to copy it to root table for displaying in events log.
After I added system_uuid column to root table as well, a lot of SQL queries from other SW Components were failing, because existing queries didn't qualify system_uuid properly, e.g.
SELECT R.id, R.name, system_uuid, C.ssn
FROM root R JOIN child1 C ON C.id = R.id
The issue could have been prevented by writing C.system_uuid.
Now we are negotiating between teams: who should fix issue? Maintainers of those SW Components with those "bad" SQLs, or me (by fixing the component which added the new column creating the ambiguity)?
What are best practices for such cases?