primaryKey name fix

This commit is contained in:
Mel O'Hagan 2022-05-31 14:47:27 +01:00
parent 3c1d32ba24
commit fcdc2bf584
1 changed files with 2 additions and 8 deletions

View File

@ -112,15 +112,9 @@ 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.Field
if (
column["primary key"] === "Y" &&
primaryKeys.indexOf(column.Key) === -1
) {
const columnName = column.name
if (column["primary key"] === "Y") {
primaryKeys.push(columnName)
}
const constraints = {