Skip to content

Commit 244e6b0

Browse files
author
unknown
committed
Fixed errors with formatting PK name
1 parent a827c17 commit 244e6b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

forward_engineering/alterScript/alterScriptHelpers/entityHelpers/primaryKeyHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const getDropCompositePkScripts = (_, ddlProvider) => (collection) => {
173173

174174
return oldPrimaryKeys
175175
.map((oldPk) => {
176-
let constraintName = getDefaultConstraintName(entityName);
176+
let constraintName = wrapInQuotes(getDefaultConstraintName(entityName));
177177
if (oldPk.constraintName) {
178178
constraintName = wrapInQuotes(oldPk.constraintName);
179179
}

forward_engineering/ddlProvider/ddlHelpers/constraintsHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = ({
8383

8484
return {
8585
statement: assignTemplates(templates.createKeyConstraint, {
86-
constraintName: keyData.name ? `CONSTRAINT ${wrapInQuotes(constraintName)} ` : '',
86+
constraintName: keyData.name ? `CONSTRAINT ${constraintName} ` : '',
8787
keyType: keyData.keyType,
8888
columns,
8989
includeNonKey,

0 commit comments

Comments
 (0)