Skip to content

Commit a741546

Browse files
committed
fix
1 parent f7464f7 commit a741546

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

forward_engineering/alterScript/alterScriptHelpers/entityHelpers/checkConstraintHelper.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,7 @@ const addCheckConstraint = (tableName, constraintName, expression, noInherit = f
100100
* */
101101
const getAddCheckConstraintScriptDtos = (constraintHistory, fullTableName) => {
102102
return constraintHistory
103-
.filter(
104-
historyEntry =>
105-
historyEntry.new?.chkConstrName &&
106-
historyEntry.new?.constrExpression &&
107-
!historyEntry.old?.constrExpression,
108-
)
103+
.filter(historyEntry => historyEntry.new?.constrExpression && !historyEntry.old?.constrExpression)
109104
.map(historyEntry => {
110105
const { chkConstrName, constrExpression, noInherit } = historyEntry.new;
111106
return addCheckConstraint(fullTableName, wrapInQuotes(chkConstrName), constrExpression, noInherit);

0 commit comments

Comments
 (0)