Skip to content

Commit

Permalink
0004001: Added null check for platform column
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-miller-jumpmind committed Aug 15, 2022
1 parent 4256fcd commit 725a289
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -715,7 +715,7 @@ protected void writeColumnDefaultValue(Table table, Column column, StringBuilder
String defaultValue = getNativeDefaultValue(column);
int typeCode = column.getMappedTypeCode();
PlatformColumn platformColumn = column.findPlatformColumn(databaseName);
if (StringUtils.containsIgnoreCase(platformColumn.getType(), "uniqueidentifier")) {
if (platformColumn != null && StringUtils.containsIgnoreCase(platformColumn.getType(), "uniqueidentifier")) {
String defaultValueStr = mapDefaultValue(defaultValue, typeCode);
if (StringUtils.containsIgnoreCase(defaultValueStr, "NEWID()") || StringUtils.containsIgnoreCase(defaultValueStr, "NEWSEQUENTIALID()")) {
ddl.append(defaultValueStr);
Expand Down

0 comments on commit 725a289

Please sign in to comment.