Skip to content

Commit 81001ac

Browse files
use correct new properties or empty (#96)
<!--do not remove this marker, its needed to replace info when ticket title is updated --> <!--jira-description-action-hidden-marker-start--> <table> <td> <a href="https://hackolade.atlassian.net/browse/HCK-15268" title="HCK-15268" target="_blank"><img alt="Sub-bug" src="https://hackolade.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium" />HCK-15268</a> [Oracle,PostgreSQL,BigQuery,etc.][ALTER] Cannot convert undefined or null to object </td></table> <br /> <!--jira-description-action-hidden-marker-end--> ## Content You have no Jira task for this PR? Describe your changes here... ... ## Technical details You feel the need to provide technical explanations? You can do it here... ...
1 parent e33fecb commit 81001ac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

forward_engineering/alterScript/alterScriptHelpers/entityHelpers/primaryKeyHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const wasCompositePkChangedInTransitionFromCompositeToRegular = collection => {
5050
return PrimaryKeyTransitionDto.noTransition();
5151
}
5252
const idOfPkColumn = idsOfColumns[0];
53-
const newColumnJsonSchema = Object.values(collection.role.properties).find(
53+
const newColumnJsonSchema = Object.values(collection.properties || {}).find(
5454
columnJsonSchema => columnJsonSchema.GUID === idOfPkColumn,
5555
);
5656
if (!newColumnJsonSchema) {

forward_engineering/alterScript/alterScriptHelpers/entityHelpers/uniqueKeyHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const wasCompositeUniqueKeyChangedInTransitionFromCompositeToRegular = collectio
5050
return UniqueKeyTransitionDto.noTransition();
5151
}
5252
const idOfUniqueKeyColumn = idsOfColumns[0];
53-
const newColumnJsonSchema = Object.values(collection.role.properties).find(
53+
const newColumnJsonSchema = Object.values(collection.properties || {}).find(
5454
columnJsonSchema => columnJsonSchema.GUID === idOfUniqueKeyColumn,
5555
);
5656
if (!newColumnJsonSchema) {

0 commit comments

Comments
 (0)