Skip to content

Commit

Permalink
fix: fk on update should not use attributes of on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Szbuli committed Jan 14, 2020
1 parent 90b4065 commit 2baa934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/driver/sap/SapQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ export class SapQueryRunner extends BaseQueryRunner implements QueryRunner {
constraint += ` ON DELETE ${onDelete}`;
}
if (fk.onUpdate) {
const onUpdate = fk.onDelete === "NO ACTION" ? "RESTRICT" : fk.onDelete;
const onUpdate = fk.onUpdate === "NO ACTION" ? "RESTRICT" : fk.onUpdate;
constraint += ` ON UPDATE ${onUpdate}`;
}

Expand Down

0 comments on commit 2baa934

Please sign in to comment.