Skip to content

Commit

Permalink
Merge pull request #14 from singlestore-labs/bugFix
Browse files Browse the repository at this point in the history
Fixed nullpointer exception
  • Loading branch information
AdalbertMemSQL authored Aug 19, 2024
2 parents e53801a + dc24a9b commit 8557aa7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions generate-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ async function main() {
const configuration: Configuration = {
tables: tables[0].map(table => {
const constraints: { [k: string]: UniquenessConstraint } = {};
(table["UNIQUE_CONSTRAINTS"] as UniqueKey[]).forEach(key => {
constraints[key.name] = { unique_columns: key.columns }
})
if (table["UNIQUE_CONSTRAINTS"]) {
(table["UNIQUE_CONSTRAINTS"] as UniqueKey[]).forEach(key => {
constraints[key.name] = { unique_columns: key.columns }
})
}

return {
tableName: table["TABLE_NAME"],
Expand Down

0 comments on commit 8557aa7

Please sign in to comment.