From 4772acb1c4109739b07ce8b591c586aca92ffed0 Mon Sep 17 00:00:00 2001 From: Chris Aumann Date: Mon, 21 Jul 2014 23:33:41 +0200 Subject: [PATCH] Add basic support for DEFAULT values --- field.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/field.go b/field.go index 57d94963..7b2cd4d3 100644 --- a/field.go +++ b/field.go @@ -57,6 +57,11 @@ func parseSqlTag(str string) (typ string, addational_typ string, size int) { } addational_typ = m["NOT NULL"] + " " + m["UNIQUE"] + + if len(m["DEFAULT"]) > 0 { + addational_typ = addational_typ + "DEFAULT " + m["DEFAULT"] + } + } return }