Issue with loading Detailed View

Feature(s) impacted

Detailed View

Observed behavior

Not Loading

Expected behavior

Should Load detailed View

Failure Logs

"SequelizeDatabaseError: operator does not exist: character varying = integer

Context

In the logs, I can see the query ....transactionBuyer\".\"id\" = '104505';
transactionBuyer.id is an integer field, but gets compared to a string.
This only happens in our staging environment which is a clone of our production environment.
We have the same code running on both but this error happens only in staging.

  • Project name: Novelship-Admin
  • Team name: Operations
  • Environment name: Staging
  • Agent type & version: Express Sequalize: v7.2.1 & v7.12.5
  • Recent changes made on your end if any: We switched to new Development workflow.

Hi @vigzmv ,

Does this problem appeared right after the switch to the new Development workflow ?

Kind regards,

Shohan

We didn’t check immediately after the new Development workflow. This was observed after few days.

Update:

  1. Tried upgrading Forest sequalize to latest v7 package which is v7.12.5
  2. Ensured everything is the same across Production & Staging. OS, Packages, Slug size, ENVs etc.
  3. Deleted Staging env and recreated.

Still, one Resource Detail can be viewed in Production but not in Staging.
This is due to Forest applying where query with numeric ID compared to a string.
Is there a way we can force Forest to compare with numeric values only?

Hello @vigzmv ,

Indeed I confirm you that on our side we can see that you have the same configuration between your Staging environment and your Production environment. However, I have a question: do you have the same version of Postgres on your Staging and Production environment :thinking: ?

Kind regards,

Florian

Thanks for the support Florian.

Thanks for pointing this out, yes out Staging has pg13.9 and Production has pg13.8. We are not too sure about upgrading Production pg to test this out. I also double checked that DDL for the table is same on both database tables.
Is there any other way?

Hello,

Can you give me the definition of your Sequalize models that encounter this error ? ( you can send them to me privately if you don’t want them to appear on this public thread ). You can also give me the DDL of your tables so that I can look at them on my side.

Florian