Skip to content

Commit

Permalink
fix(etl-processes): sql syntax error in generatePrimaryKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Jmurp11 committed Sep 4, 2021
1 parent 971c567 commit 5652608
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/etl-processes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function formatPrimaryKey(formatColumnsResult: FormatColumnsResult): stri
}

export function generatePrimaryKey(formatColumnsResult: FormatColumnsResult): string[] {
const primaryColumn = `id ${SQLType.INT} ${SQLKeyword.NOT_NULL} ${SQLKeyword.PRIMARY_KEY} ${SQLKeyword.SERIAL}`;
const primaryColumn = `id ${SQLKeyword.SERIAL} ${SQLKeyword.NOT_NULL} ${SQLKeyword.PRIMARY_KEY}`;

formatColumnsResult.formattedColumns.push(primaryColumn);

Expand Down
2 changes: 1 addition & 1 deletion src/tests/test-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const etlProcesses = {
`${columns_one_pk[0].name} ${columns_one_pk[0].type}`,
`${columns_one_pk[1].name} ${columns_one_pk[1].type}`,
`${columns_one_pk[2].name} ${columns_one_pk[2].type}`,
`id ${SQLType.INT} ${SQLKeyword.NOT_NULL} ${SQLKeyword.PRIMARY_KEY} ${SQLKeyword.SERIAL}`
`id ${SQLKeyword.SERIAL} ${SQLKeyword.NOT_NULL} ${SQLKeyword.PRIMARY_KEY}`
],
};

Expand Down

0 comments on commit 5652608

Please sign in to comment.