Hello, I'm trying to launch SpiceDB as a library, ...
# spicedb
a
Hello, I'm trying to launch SpiceDB as a library, but I encounter an error when writing the schema: "ERROR: relation \"relation_tuple_transaction\" does not exist (SQLSTATE 42P01)." Can you guys explain what is happening and how I can fix it? Here are my datastore options:
Copy code
go
cfg := datastore.DefaultDatastoreConfig()
cfg.Engine = datastore.PostgresEngine
cfg.URI = "postgres://postgres:postgres@localhost:5432/spicedb?sslmode=disable"
ds, err := datastore.NewDatastore(ctx, cfg.ToOption(), datastore.WithRequestHedgingEnabled(false))
And this is how I'm writing the schema:
Copy code
go
schemaSrv := v1.NewSchemaServiceClient(conn)
if _, err = schemaSrv.WriteSchema(ctx, &v1.WriteSchemaRequest{ Schema: schema }); err != nil {
    return fmt.Errorf("failed to write schema: %w", err)
}
log.Debug().Msg("schema written")
8 Views