# Types in layout editor after database type change and models update

**URL:** <https://community.forestadmin.com/t/types-in-layout-editor-after-database-type-change-and-models-update/961>\
**Category:** Help me!\
**Created:** [September 15, 2020, 10:13am UTC](https://community.forestadmin.com/t/types-in-layout-editor-after-database-type-change-and-models-update/961 "2020-09-15T10:13:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmngrndjn](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/dmngrndjn/32/775_2.png) [@dmngrndjn](https://community.forestadmin.com/u/dmngrndjn)\
**Post date:** [September 15, 2020, 10:13am UTC](https://community.forestadmin.com/t/types-in-layout-editor-after-database-type-change-and-models-update/961/1 "2020-09-15T10:13:54Z")

</div>

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

N/A

## Context

We updated models as such 🙂 vatFrequency: {

```javascript
      type: DataTypes.ENUM(
        'monthly',
        'quarterly',
        'yearly',
      ),
      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

---

<div class="post-metadata">

**Author:** ![anon79585656](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon79585656](https://community.forestadmin.com/u/anon79585656)\
**Post date:** [September 15, 2020, 1:38pm UTC](https://community.forestadmin.com/t/types-in-layout-editor-after-database-type-change-and-models-update/961/2 "2020-09-15T13:38:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dmngrndjn](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/dmngrndjn/32/775_2.png) [@dmngrndjn](https://community.forestadmin.com/u/dmngrndjn)\
**Post date:** [September 15, 2020, 2:08pm UTC](https://community.forestadmin.com/t/types-in-layout-editor-after-database-type-change-and-models-update/961/3 "2020-09-15T14:08:55Z")

</div>

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 🙂
