Browse Source

Revert "primaryKey name fix"

This reverts commit fcdc2bf584.
pull/6155/head
Mel O'Hagan 4 years ago
parent
commit
be8cd07cdc
  1. 10
      packages/server/src/integrations/snowflake.ts

10
packages/server/src/integrations/snowflake.ts

@ -112,9 +112,15 @@ module SnowflakeModule {
const descResp = await this.internalQuery({
sql: `DESCRIBE TABLE ${tableName};`,
})
if (tableName === "CUSTOMER") {
console.log("DESC = ", descResp)
}
for (let column of descResp) {
const columnName = column.name
if (column["primary key"] === "Y") {
const columnName = column.Field
if (
column["primary key"] === "Y" &&
primaryKeys.indexOf(column.Key) === -1
) {
primaryKeys.push(columnName)
}
const constraints = {

Loading…
Cancel
Save