Schema evolution
# spicedb
a
Hi , I have a question regarding the spice dB schema and relationship designing, can we create such relationship which can support multiple subject/object ids so that while fetching any user permission we can easily iterate through that one relationship and get the permissions of user role on that particular location/tenant Id?
v
I don't fully parse the question but I'll give it a go. Sounds like you are asking if it's possible to start with a schema design, and iterate in it while until you get to the target business domain semantics? The answer is yes, but with caveats (no pun intended - caveats is a feature to achieve ABAC in SpiceDB). You can iterate in your schema so long the changes are backward compatible. For example, you can add a new relation to an object and use it in a permission. You can also change that permission, no problem. But if you try to drop a relation that contains relationship data, SpiceDB will prevent it. It's designed to prevent human error. If you want to remove a relation, you first have to delete the relationships stored in it.
a
thank you for the reply , can you please share sample schema and relationship so that I can refer that ?
v
You can find several schema examples in play.authzed.com