mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 15:20:54 +00:00
Merge pull request #3888 from gavin2014/develop
[Fix] Fix create table with SQLite not supporting COMMENT syntax
This commit is contained in:
commit
90d0b43f34
@ -198,7 +198,7 @@ func getDbCreateSQL(al *alias) (sqls []string, tableIndexes map[string][]dbIndex
|
|||||||
column = strings.Replace(column, "%COL%", fi.column, -1)
|
column = strings.Replace(column, "%COL%", fi.column, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if fi.description != "" {
|
if fi.description != "" && al.Driver!=DRSqlite {
|
||||||
column += " " + fmt.Sprintf("COMMENT '%s'",fi.description)
|
column += " " + fmt.Sprintf("COMMENT '%s'",fi.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user