Skip to content

Commit

Permalink
Fix #293
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Jul 28, 2021
1 parent 103aaf5 commit ad69490
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ public static void mergeMetadata(DatabaseStructure updatedDatabaseStructure, Vie
for (TableStructure table : schema.getTables()) {
metadata.getTableById(table.getId()).setDescription(table.getDescription());

metadata.getTableById(table.getId()).getPrimaryKey().setDescription(table.getPrimaryKey().getDescription());
if (metadata.getTableById(table.getId()).getPrimaryKey() != null) {
metadata.getTableById(table.getId()).getPrimaryKey().setDescription(table.getPrimaryKey().getDescription());
}

for (ViewerForeignKey foreignKey : metadata.getTableById(table.getId()).getForeignKeys()) {
foreignKey.setDescription(table.getForeignKeyByName(foreignKey.getName()).getDescription());
Expand Down

0 comments on commit ad69490

Please sign in to comment.