# Forest admin schema update

**URL:** <https://community.forestadmin.com/t/forest-admin-schema-update/6286>\
**Category:** Help me!\
**Created:** [May 12, 2023, 8:16am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286 "2023-05-12T08:16:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![codere](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/codere/32/6064_2.png) [@codere](https://community.forestadmin.com/u/codere)\
**Post date:** [May 12, 2023, 8:16am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286/1 "2023-05-12T08:16:34Z")

</div>

Hi, i am using forest admin for my nodejs + mongodb project.

I added some property for existing tables but i cant see them in forest admin.

I tried to run `forest schema:update` command but it generates new file and most of the my models are not working.

Im getting this error on my models

> # The request to your server either failed or returned invalid data.
> 
> Please check your console logs to get more information.

Can’t i do this without forest schema:update ? or do you know the solution of it ?

My package versions  
“forest-express-mongoose”: “7.9.4”  
“@forestadmin/agent”: “false1.0.0-beta.63”,  
“@forestadmin/datasource-mongoose”: “false1.0.0-beta.25”,

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [May 12, 2023, 8:34am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286/2 "2023-05-12T08:34:22Z")

</div>

Hello,  
Your agent is using the beta version, you **MUST** use the production ready [@forestadmin/agent version](https://www.npmjs.com/package/@forestadmin/agent) and [@forestadmin/datasource-mongoose](https://www.npmjs.com/package/@forestadmin/datasource-mongoose). You can remove the `forest-express-mongoose` of your dependencies. It is an old library and it is not necessary IF you are using the `@forestadmin/agent`. **Please 🙏, can you confirm that you `@forestadmin/agent` to run your project ? Also, what is your project name ? It will help me for debug yourself.**  
The documentation of the `agent-nodejs` is [here](https://docs.forestadmin.com/developer-guide-agents-nodejs/).

Sorry for our ambiguous documentation, but the `schema:update` is not compatible with the `@forestadmin/agent` (`agent-nodejs`).

I hope it will help you 🙏

---

<div class="post-metadata">

**Author:** ![codere](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/codere/32/6064_2.png) [@codere](https://community.forestadmin.com/u/codere)\
**Post date:** [May 12, 2023, 8:47am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286/3 "2023-05-12T08:47:16Z")

</div>

im not using agent currently so I need a solution with forest-express-mongoose  
so how can I update my database structure with it ?

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [May 12, 2023, 9:33am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286/4 "2023-05-12T09:33:27Z")

</div>

Did you update your mongoose models after added your attributes in your database ? For example, if you add the field `name` in the `user document` you must add the `name` in your `user` model inside your project.

---

<div class="post-metadata">

**Author:** ![codere](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/codere/32/6064_2.png) [@codere](https://community.forestadmin.com/u/codere)\
**Post date:** [May 12, 2023, 9:34am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286/5 "2023-05-12T09:34:43Z")

</div>

yes i can access some models in forest admin but i cant access some of them also if i create a new project, i can view all of them.

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [May 12, 2023, 9:41am UTC](https://community.forestadmin.com/t/forest-admin-schema-update/6286/6 "2023-05-12T09:41:06Z")

</div>

Currently, the agent that you use does not create automatically the mongoose models. You must write manually the new fields! The `forest schema:update` will create the new mongoose file if it detects a new model in your database.
