Update cmd_utils.go

[Fix] Fix create table with SQLite not supporting COMMENT syntax
This commit is contained in:
大盖文 2019-12-11 16:50:08 +08:00 committed by GitHub
parent aa90c67a75
commit 92a4119258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}