update collection when database schema change, with forest schema: update
When I launch forest schema: update, one of my field in my table is forgot by forest admin and not present in the models/ and so not present in the UI too, the name of this field is “coefficient” maybe it’s a reserved word ?
I expect to have the field “coefficient” in my table model and so in the UI
- Project name: Uniseed
- Team name: …
- Environment name: …
- Agent type & version: …
- Recent changes made on your end if any: …
Hey @Charles_Touret, and welcome to our community
Could you share here the logs related to you running the
forest schema:update, as well as the type of the
coefficient column you added ?
The logs should state it, but you need to delete the model you want to generate for it to be renewed, or use
forest schema:update -o tmp to re-export all your models in a dedicated folder.
Let me know
Ohh I didn’t see the logs !
→ Δ Type DOUBLE(4,2) is not handled: The column coefficient won’t be generated by Forest CLI. If you need it please create it manually.
Δ Type DOUBLE(7,2) is not handled: The column pricingAmount won’t be generated by Forest CLI. If you need it please create it manually.
Now How to create field manually ?
You should be able to directly open the model in your generated code, and add those fields manually.
Inside the associated model (
/models/your_model.js), then restarting your development server should make everything work as expected in your case.
Let me know if that helps
it works ! thank you vry much !