#Schema Not Found Error
1 messages ยท Page 1 of 1 (latest)
Hello @hard crescent , can you send which API this response belongs to and the request metadata?
For example, {{permifyUrl}}/v1/tenants/:tenantId/permissions/check
{
"metadata": {
"snap_token": "",
"schema_version": "",
"depth": 30
},
"entity": {
"type": "section",
"id": "9"
},
"permission": "editor",
"subject": {
"type": "user",
"id": "142",
"relation": ""
}
}
But it happens to all apis
Could you send me the schema you wrote last?
hmm i just noticed that one of the developers in my team updated the schema
maybe that's why
i'll update my db
the reason I'm asking is that this error will be returned if there is no 'section' entity or if the 'section' entity does not have a relation called 'editor'
entity section {
relation administrator @user @predefined_role#member
relation editor @user @predefined_role#member
relation viewer @user @predefined_role#member
relation no_access @user @predefined_role#member
i've deleted my local database... i'll start from scratch
If this entity exists in the database in the latest schema version, it should work
haaaaa im stuck, how do i create the tables again...
which version of Permify are you using?
I deleted my db and now I'm having troubles setting it up again
5.0
database:
engine: 'postgres'
uri: 'postgres://postgres:secret@host.docker.internal:5433/permify'
auto_migrate: false
max_open_connections: 20
max_idle_connections: 1
max_connection_lifetime: 300s
max_connection_idle_time: 60s
garbage_collection:
enable: true
interval: 3m
timeout: 3m
window: 720h
number_of_threads: 1
Can you upgrade to permify version v0.5.4 and set auto migrate to true in this config?
additionally, if you don't want to run auto migrate, we have commands like migrate up, migrate reset.
what does that do?
my concern is that, if we change the schema in the future, what do we need to do? surely we can't truncate the db in production...
our suggestion here is to specify the schema version in the metadata. This will allow you to work with the schema from the older version. If you don't specify it, the latest version will be used
do you generally foresee the changes you'll make to the schema to be major changes?
are we talking about the authorization schema here, or the Postgres schema? I might have misunderstood
i don't think we are planning to do new major changes for the moment but since we're still in the migration process, it can be
the authorization schema
the reaosn for my first message was that I suddenly got these error 13 SCHEMA_NOT_FOUND even though there was a schema in the database
I think now that I've deleted everything, that it was due that someone in my team deleted the config.yaml
So probably permify was running in memory writeDB, am i right ?
yes, if the config has changed, it will work in memory by default
would it be a better approach for you if, for such situations, it returns 'DENIED' instead of an error message?
no, i don't think it would help that much
it's just that i forgot that in order to run on pgsql, you needed a config.yaml file. I thought it was by default
so I couldn't understand why it said "no schema" while in my database there were actually schema defined. It just didn't know to run on pgsql if there was no config.yaml
on another note, were there breaking changes from v4 to v5? I get these errors in my setup now (grpc)
mifyModule","payload":{"error":{"path":"/base.v1.Relationship/Write","code":12,"details":"unknown service base.v1.Relationship"},
guess it was, it's called data
Yes, it has been done. Relationship has changed to Data. You can look at the details from this link: https://docs.permify.co/docs/use-cases/abac.
thanks for the support by the way ๐
You're very welcome! I'm glad I could assist you ๐
Hey @hard crescent ,
In case you want to prevent this kind of problems, and easy rollback; we have a managed service and on-premise plans.
- Schema staging for approving schemas before submitting.
- Advanced backup
- Auditing and access check history
- Admin dashboard and more
Feel free to schedule a call for more details; https://meetings-eu1.hubspot.com/fred-dogan/call-with-an-expert