One of my mysql table field is not detected by forest schema: update

Feature(s) impacted

update collection when database schema change, with forest schema: update

Observed behavior

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 ?

Expected behavior

I expect to have the field “coefficient” in my table model and so in the UI

Context

  • 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 :wave:

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 :pray:

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 ? :melting_face:

1 Like

You should be able to directly open the model in your generated code, and add those fields manually.

Adding

    coefficient: {
      type: DataTypes.DOUBLE,
    },

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 :slight_smile:

it works ! thank you vry much ! :slight_smile:

1 Like