Skip to content

Commit 9e3d5f3

Browse files
HCK-13024: fix relationship without schema (#164)
Co-authored-by: Vitalii Bedletskyi <[email protected]>
1 parent 7143de8 commit 9e3d5f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

forward_engineering/ddlProvider/ddlProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ module.exports = (baseProvider, options, app) => {
428428
additionalPropertiesForForeignKey(customProperties);
429429

430430
const foreignKeyStatement = assignTemplates(templates.createForeignKey, {
431-
primaryTable: getNamePrefixedWithSchemaName(primaryTable, primarySchemaName || schemaData.schemaName),
432-
foreignTable: getNamePrefixedWithSchemaName(foreignTable, foreignSchemaName || schemaData.schemaName),
431+
primaryTable: getNamePrefixedWithSchemaName(primaryTable, primarySchemaName || schemaData?.schemaName),
432+
foreignTable: getNamePrefixedWithSchemaName(foreignTable, foreignSchemaName || schemaData?.schemaName),
433433
name: name ? wrapInQuotes(name) : '',
434434
foreignKey: areKeysActivated ? foreignKeysToString(foreignKey) : foreignActiveKeysToString(foreignKey),
435435
primaryKey: areKeysActivated ? foreignKeysToString(primaryKey) : foreignActiveKeysToString(primaryKey),

0 commit comments

Comments
 (0)