Skip to content

Commit

Permalink
0005097: Postgres default value support for gen_random_uuid()
Browse files Browse the repository at this point in the history
  • Loading branch information
joshahicks committed Oct 6, 2021
1 parent 849f8ec commit 31b8f54
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -449,7 +449,8 @@ protected boolean processChange(Database currentModel, Database desiredModel,
protected void printDefaultValue(String defaultValue, int typeCode, StringBuilder ddl) {
if (defaultValue != null &&
((defaultValue.endsWith("::uuid") && Types.OTHER == typeCode) ||
(defaultValue.contains("::") && Types.ARRAY == typeCode))) {
(defaultValue.contains("::") && Types.ARRAY == typeCode) ||
(defaultValue.contains("gen_random_uuid()")))) {
ddl.append(defaultValue);
} else if (Types.BOOLEAN == typeCode || Types.BIT == typeCode) {
boolean isNull = false;
Expand Down

0 comments on commit 31b8f54

Please sign in to comment.