You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constgetColumns='select * from information_schema.columns '+
`where table_name = '${mappedType}'`
Let's say I have a schema named schema-v1 and another named schema-v2 that both have a table called users. If schema-v1 has a column in users like users.email then the below if statement will wrongly think that the column exists in schema-v2. This is because information_schema.columns returns a list of columns in all schemas.
It doesn't add the columns to the new schema, since it thinks they already exist. I was able to resolve my issue by removing the schema-v1. But it wasn't immediately obvious what was causing the issue.
fortune-postgres/lib/index.js
Lines 141 to 142 in 7d158ec
Let's say I have a schema named
schema-v1
and another namedschema-v2
that both have a table calledusers
. Ifschema-v1
has a column in users like users.email then the below if statement will wrongly think that the column exists inschema-v2
. This is because information_schema.columns returns a list of columns in all schemas.fortune-postgres/lib/index.js
Line 188 in 7d158ec
Solution should be to specify the exact schema to search in.
The text was updated successfully, but these errors were encountered: