# Migration to v7. Works 99%, just the production DB never returns query results

**URL:** <https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566>\
**Category:** Help me!\
**Created:** [October 18, 2021, 3:47pm UTC](https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566 "2021-10-18T15:47:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Nolet](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/tim_nolet/32/3397_2.png) [@Tim\_Nolet](https://community.forestadmin.com/u/Tim_Nolet)\
**Post date:** [October 18, 2021, 3:47pm UTC](https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566/1 "2021-10-18T15:47:27Z")

</div>

## Expected behavior

I step through the V6 to V7 upgrade for the ExpressJs / Sequelize upgrade. It works 100% on our local / dev setup. I push to production on Heroku and everything loads and authenticates. Just the queries do not return.

## Actual behavior

I can see the initial `count` queries that are run on our standard Forest dashboard never return. They timeout after 30 seconds. Note that rolling back to V6 fixes everything. My gut feeling is that somewhere between the new `databases.js` config and the ENV variables something is missing or wrong and I missed this in the upgrade guide.

Again, I can see the requests coming in, being authenticated and then never returning.

## Failure Logs

## Context

Here are the (redacted) env vars set on Heroku

DATABASE\_SSL: true  
DATABASE\_URL: postgres://ForestAdmin:xxx  
FORESTADMIN\_URL: postgres://ForestAdmin:xxxx  
FOREST\_AUTH\_SECRET: xxxx  
FOREST\_ENV\_SECRET: xxxx  
NODE\_ENV: production  
PGSSLMODE: require  
APPLICATION\_URL: “the domain of the Heroku app”

- Package Version: 7.0.0
- Express Version: 4.17.1
- Sequelize Version: 5.21.3
- Database Dialect: Postgres
- Database Version: 10.18
- Project Name: Checkly

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [October 19, 2021, 9:19am UTC](https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566/2 "2021-10-19T09:19:36Z")

</div>

Hi @Tim_Nolet,

Can you please:

- go to version last of 7 (it’s 7.12.2)
- put a console.log in the ‘forest/[model-name].js’ file, can you reach it?

Regards

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [October 19, 2021, 12:50pm UTC](https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566/3 "2021-10-19T12:50:58Z")

</div>

Another remark:

Updating your pg (postgres driver version) may helps.  
Please let me know.

Regards

---

<div class="post-metadata">

**Author:** ![Tim\_Nolet](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/tim_nolet/32/3397_2.png) [@Tim\_Nolet](https://community.forestadmin.com/u/Tim_Nolet)\
**Post date:** [November 2, 2021, 6:18pm UTC](https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566/4 "2021-11-02T18:18:26Z")

</div>

I managed to get this running. It was jumping from error to error though. The last one I had to tackle was `DATABASE_REJECT_UNAUTHORIZED`

---

<div class="post-metadata">

**Author:** ![anon16419211](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anon16419211](https://community.forestadmin.com/u/anon16419211)\
**Post date:** [November 3, 2021, 8:53am UTC](https://community.forestadmin.com/t/migration-to-v7-works-99-just-the-production-db-never-returns-query-results/3566/5 "2021-11-03T08:53:14Z")

</div>

Happy to hear that everything is up and running @Tim_Nolet. Let us know if you encounter any other issue. 🙂
