Hello guys, i’m really new to this i have a small database structure and i used forest to have a small backoffice and host the API on Gcloud.
It worked, but now i need to update the schema:
I normally ran the forest schema:update before deleting the files necessary and it worked.
then I deployed the new version on gcloud which works fine when i curl the new field.
BUT the dashboard does not update with the new field .
EDIT: after double checked: .forestadmin-schema.json has not been updated, i cant understand why
Hello,
I am checking your different schema and they are identical.
What fields are not displayed?
Also, in FA when you add a new collection/segment you should edit your layout to turn on the visibility.
Indeed, I can’t see the days field in your membership collection, and as @Alban_Bertolini stated, all your schema are identical across all your environments.
Could you please check:
On your Development environment, is the day field present in your .forestadmin-schema.json and in your models/membership.js file?
If it is, restarting your development server should work as expected
If it isn’t, delete your models/membership.js and re-run forest schema:update to re-create it.
As a side note, here is the “classic” workflow:
Each time your development server starts (Using NODE_ENV !== production), your .forestadmin-schema.json` is re-generated and sent to our servers.
Each time your remote or production server starts (Using NODE_ENV === production), your .forestadmin-schema.json isn’t regenerated, but it’ll still be sent to our servers.
Nice. I can see that indeed, your .forestadmin-schema.json was updated on your local environment.
How do i push now ?
This really depends on your servers, production/staging environment etc. You’ll most likely have to commit/push your .forestadmin-schema.json along with all your others models changes, and deploy these changes on your servers.
As long as your .forestadmin-schema.json & your code modification are deployed, everything should sync normally.
Yeah but how do i do that , i’m really sorry , this must be basic knowledge for you, but the documentation is not that clear
Not really it’s just that I don’t know how you handle your code changes and how your code is deployed to your servers.
If you deploy all your code changes & your .forestadmin-schema.json to your own servers, everything should be automatic (Since the schema is sent once your server restart)
ok i’m just deploying the API on Google App Engine and that should be good.
What does forest schema:apply tho ?
EDIT: ok new API is deployed (for staging only) but nothing changes on the dashboard
EDIT2: seems like it took some time , but it’s finally there
EDIT3: thx !