From 92a4119258a8717b44c4180bc4caf8fa6c87d0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9B=96=E6=96=87?= <812568591@qq.com> Date: Wed, 11 Dec 2019 16:50:08 +0800 Subject: [PATCH] Update cmd_utils.go [Fix] Fix create table with SQLite not supporting COMMENT syntax --- orm/cmd_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orm/cmd_utils.go b/orm/cmd_utils.go index 7c9aa51e..61f17346 100644 --- a/orm/cmd_utils.go +++ b/orm/cmd_utils.go @@ -198,7 +198,7 @@ func getDbCreateSQL(al *alias) (sqls []string, tableIndexes map[string][]dbIndex column = strings.Replace(column, "%COL%", fi.column, -1) } - if fi.description != "" { + if fi.description != "" && al.Driver!=DRSqlite { column += " " + fmt.Sprintf("COMMENT '%s'",fi.description) }