Skip to content

Commit

Permalink
Triggers: fixed FE of OR REPLACE statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalii4as committed Feb 11, 2022
1 parent b80899a commit bfe7463
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forward_engineering/helpers/triggerHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module.exports = ({ _, assignTemplates, templates, getNamePrefixedWithSchemaName
const options = getTriggerOptions(trigger);

return assignTemplates(templates.createTrigger, {
orReplace: trigger.triggerOrReplace,
orReplace: trigger.triggerOrReplace ? ' OR REPLACE' : '',
constraint: trigger.triggerConstraint ? ' CONSTRAINT' : '',
actionTiming: trigger.triggerType,
actionTiming: trigger.triggerType ?? '',
functionKey: dbVersion === 'v10.x' ? 'PROCEDURE' : 'FUNCTION',
functionName: trigger.triggerFunction,
name: trigger.name,
Expand Down

0 comments on commit bfe7463

Please sign in to comment.