From 981d5db663eb018386c8df25e79fbecb3a4722e1 Mon Sep 17 00:00:00 2001 From: Dhiver Date: Mon, 4 Sep 2017 16:23:42 +0200 Subject: [PATCH] Fix postgres dialect UUID sqlType evaluation (#1564) --- dialect_postgres.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dialect_postgres.go b/dialect_postgres.go index 4d362919..75aef9ba 100644 --- a/dialect_postgres.go +++ b/dialect_postgres.go @@ -67,8 +67,9 @@ func (s *postgres) DataTypeOf(field *StructField) string { default: if IsByteArrayOrSlice(dataValue) { sqlType = "bytea" - } else if isUUID(dataValue) { - sqlType = "uuid" + if isUUID(dataValue) { + sqlType = "uuid" + } } } }