Let's call this the "old" schema:
definition namespace/subscription {
relation subscriber: namespace/user
permission is_subscribed = subscriber
}
definition namespace/user {
}
And this the "new" schema:
definition subscription {
relation subscriber: user
permission is_subscribed = subscriber
}
definition user {
}
Start SpiceDB:
Write the old schema:
Write the new schema with tracing enabled:
zed schema write new.zed --log-level=trace
See that the written schema still has the prefixes:
10:50AM TRC writing schema request={"schema":"definition namespace/subscription {\n\trelation subscriber: namespace/user\n\tpermission is_subscribed = subscriber\n}\n\ndefinition namespace/user {}"}
This is due to our rewriting logic, and was part of serverless support. This may be fixed by the refactors in #597, but if it's not we should fix it.
It's an edge case but it's a sharp edge.