Merge pull request #170 from chr4/master

Add basic support for DEFAULT values
This commit is contained in:
Jinzhu 2014-07-23 11:28:59 +08:00
commit ae12a1cca5
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,11 @@ func parseSqlTag(str string) (typ string, addational_typ string, size int) {
} }
addational_typ = m["NOT NULL"] + " " + m["UNIQUE"] addational_typ = m["NOT NULL"] + " " + m["UNIQUE"]
if len(m["DEFAULT"]) > 0 {
addational_typ = addational_typ + "DEFAULT " + m["DEFAULT"]
}
} }
return return
} }