Skip to content

Commit

Permalink
fix: SQLite 不支持 COMMENT (jinzhu#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
duguying authored Nov 20, 2021
1 parent 90f139a commit 5c235b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var ParseFieldStructForDialect = func(field *StructField, dialect Dialect) (fiel
additionalType = additionalType + " DEFAULT " + value
}

if value, ok := field.TagSettingsGet("COMMENT"); ok {
if value, ok := field.TagSettingsGet("COMMENT"); ok && dialect.GetName() != "sqlite3" {
additionalType = additionalType + " COMMENT " + value
}

Expand Down

0 comments on commit 5c235b7

Please sign in to comment.