I'm currently looking at creating some tooling for...
# spicedb
p
I'm currently looking at creating some tooling for managing "migrations" in the authorization model. Meaning updating relationships, adding "base" relations, etc. together with the schema itself. Does anyone know of any tooling or practices you can share? I'm thinking about scenarios like this: * I need to replace/rename a relationship and have to copy and/or transform relations from one entity to another * I'm adding new entities to my schema and want to add some base relations that connect those entities with other existing entities * I'm removing a relationship in the schema that's no longer used and need to delete all relationships first etc. So far we have written small console apps or used zed to perform this type of tasks, but this now becomes a bit messy as we want to push changes through dev/staging/production easily, as well as all developers running local versions of the model, and we now also have ephemeral dev environments that we want to spin up to test changes. My basic idea was to mimic how most database tools works (that has a "DatabaseVersion" table, containing which migrations have been applied) by using a "virtual" entity with relations that represents each migration, and then create a custom tool that execute scripts containing the actual migrations (and definition on dependencies and order of execution). Has anyone done something similar, or can point me in a better direction?
Copy code
definition migration {
}

definition database_version {
    relation applied: migration
}
3 Views