primaryKey name fix
This commit is contained in:
parent
11a9138bdb
commit
9c408fda9c
|
@ -112,15 +112,9 @@ module SnowflakeModule {
|
||||||
const descResp = await this.internalQuery({
|
const descResp = await this.internalQuery({
|
||||||
sql: `DESCRIBE TABLE ${tableName};`,
|
sql: `DESCRIBE TABLE ${tableName};`,
|
||||||
})
|
})
|
||||||
if (tableName === "CUSTOMER") {
|
|
||||||
console.log("DESC = ", descResp)
|
|
||||||
}
|
|
||||||
for (let column of descResp) {
|
for (let column of descResp) {
|
||||||
const columnName = column.Field
|
const columnName = column.name
|
||||||
if (
|
if (column["primary key"] === "Y") {
|
||||||
column["primary key"] === "Y" &&
|
|
||||||
primaryKeys.indexOf(column.Key) === -1
|
|
||||||
) {
|
|
||||||
primaryKeys.push(columnName)
|
primaryKeys.push(columnName)
|
||||||
}
|
}
|
||||||
const constraints = {
|
const constraints = {
|
||||||
|
|
Loading…
Reference in New Issue