# Database & table updates

**URL:** <https://community.forestadmin.com/t/database-table-updates/3954>\
**Category:** Help me!\
**Created:** [December 30, 2021, 12:24pm UTC](https://community.forestadmin.com/t/database-table-updates/3954 "2021-12-30T12:24:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrlian](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mrlian](https://community.forestadmin.com/u/mrlian)\
**Post date:** [December 30, 2021, 12:24pm UTC](https://community.forestadmin.com/t/database-table-updates/3954/1 "2021-12-30T12:24:28Z")

</div>

Hi guys,

I wanted to know what would be the exact process when we apply structural changes to our database.  
If I understood correctly, when I add a table I simply have to use the `forest schema:update` command and push the files to the server.  
Is that correct or am I missing a step ?

And what if I do some changes into an existing table (adding a column, changing column name, type, add or remove constraints…), what should I do ? Delete the model file and run `forest schema:update` ? or would it not be enough ?

Thanks in advance for your help !

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [December 30, 2021, 1:16pm UTC](https://community.forestadmin.com/t/database-table-updates/3954/2 "2021-12-30T13:16:53Z")

</div>

Hi @mrlian 👋

> when I add a table I simply have to use the `forest schema:update` command and push the files to the server.

Correct!

> if I do some changes into an existing table (adding a column, changing column name, type, add or remove constraints…), what should I do ? Delete the model file and run `forest schema:update` ?

Exactly!

If you change some relations, try to remove all the models impacted.

Le me know if you have more questions.

---

<div class="post-metadata">

**Author:** ![mrlian](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@mrlian](https://community.forestadmin.com/u/mrlian)\
**Post date:** [December 30, 2021, 1:24pm UTC](https://community.forestadmin.com/t/database-table-updates/3954/3 "2021-12-30T13:24:16Z")

</div>

Ok great, thank you !  
However, I had to also run the local backend before pushing to remote environment, because `forestadmin-schema.json` is not updated in remote. What is the reason for that ? Is there any way to avoid this behaviour ?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [December 30, 2021, 2:04pm UTC](https://community.forestadmin.com/t/database-table-updates/3954/4 "2021-12-30T14:04:03Z")

</div>

Yeah it is a wanted behaviour, we recommend to versioning this file with your code.  
The UI is a reflection of this file. If you change this file the UI change.  
The only way you have to bypass this is to set NODE\_ENV to `development`

Let me know if it’s clear 😃
