Feature(s) impacted
I can’t use / display the relationship inside a database.
Here is an example (the companyPlanId
should be a relation field) :
Observed behavior
We have the same database in a staging environment and the relationships are displayed correctly:
I’ve tried to refresh the schema and to unlink / link again the main database with no success. I can’t see any relationships in the whole database
Expected behavior
We expect to have our field relationship in our production database on Forest Admin, since they have the same schemas.
Context
- Project name: 34 Trucs - Production (+ see 34 Trucs - Staging for reference)
- Team name: 33 Trucs
- Environment name: Production
- Agent technology: web version used
- Agent (forest package) name & version: no agent, only the cloud version is used
- Database type: PostgreSQL
- Recent changes made on your end if any: none since the account creation
- ORM : Prisma
Hello @mathieu_33trucs and welcome to our community.
I have looked into the schema that the Forest Admin cloud agent has analyzed from your databases, and I could see a lot of differences between staging and production projects, which explain what you are seeing above.
In particular, the field CompanyPlan
of the table Company
is seen as a plain field, not part of a relationship, but also many other differences (fields missing on one schema or the other, or different validation rules, like a field being required in one of the schemas but not the other).
You might want to check again the schemas of your datasources. Alternatively there might have been a mistake when entering your database credentials, which means that one or the other of your projects is not targeting the database that you mean.
Unfortunately if this is the latter, there is no way to check the credentials from your Forest Admin panel since those are “write only” for security purposes. The only way is to make sure is to re-enter them by going in your project settings / environment → select Production environment → then select your datasource in the list at the end and lastly Update datasource
to re-enter your credentials.
I hope this helps
Hi @Nicolas.M,
Thanks for your reply.
So, I’ve clicked on “Update credentials”.
Next, I’ve updated all the credentials + clicked on “Sync database schema”
It takes a few seconds to apply changes:
After that, I’ve refreshed my browser but nothing change:
No error encountered during the process.
I did it a few minutes ago.
This is strange.
Could you please share the postgre schema of the tables with the missing relationship, as well as the schema of the relationship itself ? In private message if you prefer
Thanks
I have received your message, thanks