I know this question was asked before, but none of the suggested solutions worked for me.
I have the following simple query:
UPDATE scm_repos repos SET token_id=(SELECT token_id FROM scm_orgs orgs WHERE repos.org_id=orgs.id)
When running this query locally on my PostgreSQL, it works as expected, but when it runs as a script on our 'deploy' phase on a remote PostgreSQL, it fails with the following error:
UPDATE scm_repos repos SET token_id=(SELECT token_id FROM scm_orgs orgs WHERE repos.org_id=orgs.id); nested exception is org.********ql.util.PSQLException: ERROR: relation "scm_repos" does not exist
I tried to surround the table name with double quotes and I also made sure that the table relates to a public schema (I saw some solutions suggests to explicitly write the schema name if not public).
What am I missing here? This is a very simple task but nothing I tried makes it run.