Skip to content

Commit 84b77b3

Browse files
committed
FE: added Fe of definition comment when reference have no comment
1 parent 5800588 commit 84b77b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

forward_engineering/ddlProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ module.exports = (baseProvider, options, app) => {
481481
};
482482
},
483483

484-
hydrateColumn({ columnDefinition, jsonSchema, schemaData }) {
484+
hydrateColumn({ columnDefinition, jsonSchema, schemaData, definitionJsonSchema }) {
485485
const collationRule = _.includes(['char', 'varchar', 'text'], columnDefinition.type)
486486
? jsonSchema.collationRule
487487
: '';
@@ -498,7 +498,7 @@ module.exports = (baseProvider, options, app) => {
498498
unique: keyHelper.isInlineUnique(jsonSchema),
499499
nullable: columnDefinition.nullable,
500500
default: columnDefinition.default,
501-
comment: jsonSchema.description,
501+
comment: jsonSchema.refDescription || jsonSchema.description || definitionJsonSchema.description,
502502
isActivated: columnDefinition.isActivated,
503503
scale: columnDefinition.scale,
504504
precision: columnDefinition.precision,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"versionDate": "2022-03-25",
55
"author": "hackolade",
66
"engines": {
7-
"hackolade": "5.4.4",
7+
"hackolade": "6.0.7",
88
"hackoladePlugin": "1.2.0"
99
},
1010
"contributes": {

0 commit comments

Comments
 (0)