# Use ForestAdmin to sync database

**URL:** <https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [June 16, 2021, 2:15pm UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717 "2021-06-16T14:15:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![caid](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@caid](https://community.forestadmin.com/u/caid)\
**Post date:** [June 16, 2021, 2:15pm UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717/1 "2021-06-16T14:15:10Z")

</div>

Hey guys, hope you’re doing great!

Is it possible to sync my database tables? By using sequelize `await this.sequelize.sync({ force: dbReset, logging: true });`

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [June 16, 2021, 2:46pm UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717/2 "2021-06-16T14:46:43Z")

</div>

Hello @caid,

Thanks for reaching out, we’re doing very well here 🙌 Hopefully you too!

To answer you properly, could you precise what do you want to achieve and why?

And as a side note, are you aware that there exists a `lumber update` command to update your models (see this [documentation](https://docs.forestadmin.com/documentation/reference-guide/models#updating-your-models-automatically) about it)?

Thanks.

---

<div class="post-metadata">

**Author:** ![caid](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@caid](https://community.forestadmin.com/u/caid)\
**Post date:** [June 16, 2021, 2:57pm UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717/3 "2021-06-16T14:57:40Z")

</div>

Hey @anon34731316,

I’m good too! 🙂  
Thanks for your fast reply!  
I want to use my forest api to create & sync a database with other tables, we can’t do that with lumber I guess 😕

Best,

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [June 16, 2021, 3:05pm UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717/4 "2021-06-16T15:05:56Z")

</div>

@caid I am sorry, your usecase is still a bit blurry to me.  
I am not sure to understand why you need to create and sync another database 🤔

But I guess your question is not really related to Forest Admin? It’s more about databases management and [Sequelize model synchronization](https://sequelize.org/master/manual/model-basics.html#model-synchronization)?

---

<div class="post-metadata">

**Author:** ![caid](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@caid](https://community.forestadmin.com/u/caid)\
**Post date:** [June 17, 2021, 9:24am UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717/5 "2021-06-17T09:24:29Z")

</div>

Hey @anon34731316 !

My message is both related to forestadmin & sequelize  
I want to sync db model as described in the link you provided (thanks btw), but i can’t find where i should put the db sync method in the forest project

---

<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:** [June 17, 2021, 9:35am UTC](https://community.forestadmin.com/t/use-forestadmin-to-sync-database/2717/6 "2021-06-17T09:35:32Z")

</div>

Hi @caid 👋 to achieve your goal, just put this in your `/models/index.js` file before exporting.  
Unfortunately you can’t do that asynchronously, If you absolutely want to do it asynchronously, i suggest to do that in your `middlewares/forestadmin.js` before liana initialization.  
Let me know if that help.
