Display of a field in a table not present

Hello :wave:

Feature(s) impacted

display a field in a table and the .forestadmin-schema.json file

Observed behavior

I added a new description field in our model refund and in our .forestadmin-schema.json file this description field is also present

And locally when I try to add it by hand I have the description field at the bottom

but when I go to my Develop environment and try to add a new refund I can’t find this field anymore

However in the database of our server we have this field
image

Expected behavior

By adding the new model, then updating the .forestadmin-schema.json file I have the description field locally.
However, after the deployment on the Develop environment, we do not see the description field anymore

Context

  • Project name: Nostrum Care v2
  • Team name: Operations
  • Environment name: Develop
  • Agent type & version: “forest-express-sequelize”: “^8.0.0”

Thanks in advance for the help :pray:

Hello @jacques_liao,
Your .forestadmin-schema.json on your Develop seems to be not synchronized because you don’t have the description field in the refunds collection.
Please make sure NODE_ENV=dev , or anything different than production. To force the synchronization of your schema you can use the forest-cli (forest schema:apply) to push your local schema at a specific environment.
Tell me if these tips helped you :pray:

Hello @Alban_Bertolini ,
Then our NODE_ENV is equal to staging
image

I apply this command: forest schema:apply


But I don’t have the impression that it works. Did I make a mistake in the order?

Did you run the forest push command ?

I tried to push but the schematics are identical I have the impression

On your local machine do you have already the description field in the refunds collection ?
Also, .forestadmin-schema.json must be in your source ! It means you should versioning your actual schema version to apply the modification on the targeted environment. When the server is starting it sends this schema at forest.

1 Like

Hello @Alban_Bertolini,
Sorry to give such a late answer.
Yes locally we already have the description field in the collection of refunds.
I also deployed environment of Develop on Preprod and prod and I have well the field description. It is only on the environment of Develop that I do not have this field :confused:

Hello,
Do you have pull the updated source code on your Develop environment ?

Yes i have pull the updated source code in Develop

Your schema was updated on October 3. Please run again forest schema:apply on the Develop env, I’am checking the logs :).

I used the command and I am in the right environment as shown on the bottom left. But it tells me that everything is good.

You are trying to update the Development | nostrumtech not the Develop environment, right?

no I try to update the Develop environment

It is your problem, forestadmin receive a request for the Development | nostrumtech not the Develop environment.

Your FOREST_ENV_SECRET is certainly not the right one. :slight_smile:

I have to change my FOREST_ENV_SECRET from my local to Develop, is that right?

Your FOREST_ENV_SECRET is a long string like 9b895ebee2567b90e75df47df5f079trda25629e320f2f43200971b4daeb41b01. This token is given during the onboarding. It is associated at en environment.

1 Like

Perfect, that was good! Now I have the field description
Thanks a lot!

Yeeess ! :partying_face: :partying_face:
Very happy to help you.
Have a good time with forest :slight_smile:

2 Likes