From 56612b0ac8a0f29a7f737c20380a874a87f9fb6a Mon Sep 17 00:00:00 2001 From: Bastien Dhiver Date: Fri, 11 Aug 2017 23:07:22 +0200 Subject: [PATCH] Fix postgres dialect UUID sqlType evaluation --- dialect_postgres.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dialect_postgres.go b/dialect_postgres.go index ed5248e0..f42ae553 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" + } } } }