https://authzed.com logo
#spicedb
Title
# spicedb
i

Igor.Shmukler

11/03/2022, 6:59 PM
I have a related question: is there a script for seeding SpiceDB? whenever i rebuild the DB, i start with a head migration then write my schema and finally execute a batch like:
Copy code
# make user from accounts.id = 2 the owner of 
# the organization from organizations.id = 1
zed relationship create organization:1 owner user:2
# make events with events.id 1 - 27 belong 
# to the organization from organizations.id = 1
zed relationship create event:1 organization organization:1
zed relationship create event:2 organization organization:1
can i persist this somehow in a config of sorts and seed everything at once?