Skip to content

Commit

Permalink
Merge pull request #116 from hackolade/HCK-3669-to-make-table-comment…
Browse files Browse the repository at this point in the history
…-changes-appear-in-the-alter-script

HCK-3669: fix adding comments and table options to table
  • Loading branch information
taras-dubyk authored Jul 25, 2023
2 parents dd091f5 + dc82dd0 commit 6591029
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions forward_engineering/ddlProvider/ddlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ module.exports = app => {
},

updateTableOptions(compMod, tableName, isGetOptionScript) {
if (!isGetOptionScript || !compMod || !compMod.tableOptions) {
if (!isGetOptionScript || !compMod) {
return '';
}
const { keyspaceName, tableOptions, comments } = compMod;
const { keyspaceName, tableOptions = {}, comments } = compMod;
const isCommentNew = comment => comment?.new && comment.new !== comment.old;
const alterTablePrefixStatement = alterTablePrefix(tableName, keyspaceName);

Expand Down
2 changes: 1 addition & 1 deletion forward_engineering/helpers/alterScriptFromDeltaHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const handleItem = (item, udtMap, generator, data) => {

const updateTableScript = getUpdateTableDto({
item: itemProperties[tableKey],
isOptionScript: generator.name === 'getUpdate',
isOptionScript: generator.name === 'getUpdate' || generator.name === 'getAdd',
propertiesScript,
keyspaceName,
tableName,
Expand Down

0 comments on commit 6591029

Please sign in to comment.