From 9c9a8e384907cf6f0caedfca4b14f6a639c7604e Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 26 Sep 2019 12:04:22 +0800 Subject: [PATCH] fix column default value be empty --- column.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/column.go b/column.go index b5906a9..8f375db 100644 --- a/column.go +++ b/column.go @@ -37,7 +37,7 @@ type Column struct { IsDeleted bool IsCascade bool IsVersion bool - DefaultIsEmpty bool + DefaultIsEmpty bool // false means column has no default set, but not default value is empty EnumOptions map[string]int SetOptions map[string]int DisableTimeZone bool @@ -65,7 +65,7 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable IsDeleted: false, IsCascade: false, IsVersion: false, - DefaultIsEmpty: false, + DefaultIsEmpty: true, // default should be no default EnumOptions: make(map[string]int), Comment: "", } -- 2.40.1