Types in layout editor after database type change and models update

We recently changed the type of one column in our database from integer to enums, with values from 0, 1, 2 to monthly, quarterly, yearly. We updated models accordingly. In Forest, under the layout editor, we were using the “alter values” feature to virtually map 0, 1, 2 to “monthly, quarterly, yearly”. We also migrated the values in our database, so we have monthly, quarterly etc instead of 0, 1, 2 for our records now.

Expected behavior

I would expect the new enum type and values to appear in the layout editor, for both the edit and display widgets.

Actual behavior

Both display and edit widget still reflect as numbers

Failure Logs



We updated models as such :slight_smile: vatFrequency: {

      type: DataTypes.ENUM(
      field: 'vat_frequency',
  • Package Version:
  • Express Version: 4.16.3
  • Sequelize Version: 6.3.6
  • Database Dialect:
  • Database Version: pg 6.4.2
  • Project Name: Pennylane

Hello @dmngrndjn and welcome to the Forest Admin community,

Thank you for sharing this issue with us.

Sorry for that first dummy question, but did you properly restart the forest agent after updating your models?
Our internal data does not show your enum settings.

Given you user name, I bet your development environment is named “Dev Dams”? Just to be sure to look at the right data.

You can also have a look at the hidden file .forestadmin-schema.json in you project folder.
It should contain a line similar to "enums": ["monthly", "quarterly", "yearly"].

If it is not the case, you can try to rename this json file, and restart your forest agent to have it regenerated.

Please let us know if this helps.

Ah, indeed, my npm start did not work, hence the schema was not updated. Everything solved now !
Thanks for having asked that first dummy question :slight_smile: